refs #6204 skip files from other environments
This commit is contained in:
parent
693e8d1bc0
commit
b503cbfa9f
18
myt-push.js
18
myt-push.js
|
@ -151,6 +151,21 @@ class Push extends Command {
|
|||
function isUndoScript(script) {
|
||||
return /\.undo\.sql$/.test(script);
|
||||
}
|
||||
function isOtherEnvScript(script, env) {
|
||||
const splitScript = script.split('.');
|
||||
const envPart = splitScript[splitScript.length - 2];
|
||||
|
||||
if (splitScript.length <= 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!env) {
|
||||
return !!envPart;
|
||||
}
|
||||
|
||||
return envPart && envPart !== env;
|
||||
}
|
||||
|
||||
|
||||
const skipFiles = new Set([
|
||||
'README.md',
|
||||
|
@ -210,6 +225,9 @@ class Push extends Command {
|
|||
if (isUndoScript(script))
|
||||
continue;
|
||||
|
||||
if (isOtherEnvScript(script, opts.env))
|
||||
continue;
|
||||
|
||||
const [[row]] = await conn.query(
|
||||
`SELECT errorNumber FROM versionLog
|
||||
WHERE code = ?
|
||||
|
|
Loading…
Reference in New Issue