fixes #6204 without isOtherRealmScript function
This commit is contained in:
parent
5ccb3de3cb
commit
b95b593292
26
myt-push.js
26
myt-push.js
|
@ -151,22 +151,7 @@ class Push extends Command {
|
||||||
function isUndoScript(script) {
|
function isUndoScript(script) {
|
||||||
return /\.undo\.sql$/.test(script);
|
return /\.undo\.sql$/.test(script);
|
||||||
}
|
}
|
||||||
function isOtherRealmScript(script, realm) {
|
|
||||||
const splitScript = script.split('.');
|
|
||||||
const realmPart = splitScript[splitScript.length - 2];
|
|
||||||
|
|
||||||
if (splitScript.length <= 2) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!realm) {
|
|
||||||
return !!realmPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
return realmPart && realmPart !== realm;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const skipFiles = new Set([
|
const skipFiles = new Set([
|
||||||
'README.md',
|
'README.md',
|
||||||
'.archive'
|
'.archive'
|
||||||
|
@ -235,13 +220,12 @@ class Push extends Command {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (match[1]) {
|
if (match[1]) {
|
||||||
if (skipRealm) {
|
if (skipRealm)
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
if (!realm)
|
||||||
if (!realm) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const [[row]] = await conn.query(
|
const [[row]] = await conn.query(
|
||||||
`SELECT errorNumber FROM versionLog
|
`SELECT errorNumber FROM versionLog
|
||||||
|
|
Loading…
Reference in New Issue