diff --git a/assets/myt.default.yml b/assets/myt.default.yml index 008abb8..6204b9c 100755 --- a/assets/myt.default.yml +++ b/assets/myt.default.yml @@ -7,6 +7,9 @@ mockFunctions: - mockUtcTime sumViews: true defaultDefiner: root@localhost +localRemotes: + - local + - docker deprecMarkRegex: __$ deprecCommentRegex: ^@deprecated [0-9]{4}-[0-9]{2}-[0-9]{2} deprecDateRegex: '[0-9]{4}-[0-9]{2}-[0-9]{2}' diff --git a/myt-push.js b/myt-push.js index f87b9d4..ce4cb05 100755 --- a/myt-push.js +++ b/myt-push.js @@ -371,9 +371,12 @@ class Push extends Command { const oldSql = await engine.fetchRoutine(type, schema, name); const oldSum = engine.getShaSum(type, schema, name); + const localRemote = opts.remote == null + || opts.localRemotes?.indexOf(opts.remote) !== -1; + const isMockFn = type == 'function' && schema == opts.versionSchema - && opts.remote == 'local' + && localRemote && opts.mockDate && opts.mockFunctions && opts.mockFunctions.indexOf(name) !== -1; diff --git a/package-lock.json b/package-lock.json index 6207456..2cc2741 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@verdnatura/myt", - "version": "1.6.10", + "version": "1.6.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@verdnatura/myt", - "version": "1.6.10", + "version": "1.6.13", "license": "GPL-3.0", "dependencies": { "@sqltools/formatter": "^1.2.5", @@ -1169,6 +1169,7 @@ "resolved": "https://registry.npmjs.org/nodegit/-/nodegit-0.27.0.tgz", "integrity": "sha512-E9K4gPjWiA0b3Tx5lfWCzG7Cvodi2idl3V5UD2fZrOrHikIfrN7Fc2kWLtMUqqomyoToYJLeIC8IV7xb1CYRLA==", "hasInstallScript": true, + "license": "MIT", "dependencies": { "fs-extra": "^7.0.0", "got": "^10.7.0", diff --git a/package.json b/package.json index 9704126..ed54327 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@verdnatura/myt", - "version": "1.6.12", + "version": "1.6.13", "author": "Verdnatura Levante SL", "description": "MySQL version control", "license": "GPL-3.0",