WIP: 5739-useDocker_inSalix #5
|
@ -6,8 +6,12 @@ const fs = require('fs-extra');
|
|||
* @param {Connection} conn MySQL connection object
|
||||
* @returns {Array<Result>} The resultset
|
||||
*/
|
||||
async function queryFromFile(conn, file) {
|
||||
async function queryFromFile(conn, file, logger) {
|
||||
const sql = await fs.readFile(file, 'utf8');
|
||||
if(logger){
|
||||
// console.log('TRY', await this.multiQuery(conn, 'SELECT * FROM vn.saleGroup;'));
|
||||
// console.log('sql: ', sql);
|
||||
}
|
||||
return await this.multiQuery(conn, sql);
|
||||
}
|
||||
|
||||
|
|
|
@ -273,12 +273,15 @@ class Push extends Command {
|
|||
|
||||
let err;
|
||||
try {
|
||||
console.log(versionDir, script.file);
|
||||
await connExt.queryFromFile(pushConn,
|
||||
`${versionsDir}/${versionDir}/${script.file}`);
|
||||
`${versionsDir}/${versionDir}/${script.file}`, versionDir == '10724-maroonOrchid');
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
|
||||
console.log('HOLAAAAAAAAAAAAAAAAAAA')
|
||||
// console.log(await conn.query(`SELECT * FROM versionLog LIMIT 1`))
|
||||
// console.log(await conn.query(`SELECT * FROM vn.saleGroup LIMIT 1`))
|
||||
await conn.query(
|
||||
`INSERT INTO versionLog
|
||||
SET code = ?,
|
||||
|
@ -302,7 +305,7 @@ class Push extends Command {
|
|||
]
|
||||
);
|
||||
|
||||
if (err) throw err;
|
||||
if (err) console.log('FALLO', err);
|
||||
nChanges++;
|
||||
}
|
||||
|
||||
|
|
|
@ -124,14 +124,14 @@ class Run extends Command {
|
|||
|
||||
try {
|
||||
const server = new Server(ct, dbConfig);
|
||||
|
||||
if (isRandom) {
|
||||
const useCustom = opts.ci || opts.network
|
||||
if (isRandom || useCustom) {
|
||||
try {
|
||||
const netSettings = await ct.inspect({
|
||||
format: '{{json .NetworkSettings}}'
|
||||
});
|
||||
|
||||
if (opts.ci || opts.network) {
|
||||
if (useCustom) {
|
||||
dbConfig.host = opts.network
|
||||
? netSettings.Networks[opts.network].IPAddress
|
||||
: netSettings.Gateway;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue