dump command fixes

This commit is contained in:
Juan Ferrer 2022-03-17 22:45:05 +01:00
parent 7b55e54091
commit 45ea00f7d1
3 changed files with 12 additions and 6 deletions

View File

@ -209,8 +209,10 @@ class Push {
console.log('Applying changed routines.');
const gitExists = await fs.pathExists(`${opts.workspace}/.git`);
let nRoutines = 0;
let changes = await fs.pathExists(`${opts.workspace}/.git`)
let changes = gitExists
? await myvc.changedRoutines(version.gitCommit)
: await myvc.cachedChanges();
changes = this.parseChanges(changes);
@ -319,11 +321,13 @@ class Push {
} else
console.log(` -> No routines changed.`);
const repo = await nodegit.Repository.open(this.opts.workspace);
const head = await repo.getHeadCommit();
if (gitExists) {
const repo = await nodegit.Repository.open(this.opts.workspace);
const head = await repo.getHeadCommit();
if (version.gitCommit !== head.sha())
await this.updateVersion('gitCommit', head.sha());
if (version.gitCommit !== head.sha())
await this.updateVersion('gitCommit', head.sha());
}
// Update and release

View File

@ -1,6 +1,6 @@
{
"name": "myvc",
"version": "1.3.1",
"version": "1.3.2",
"author": "Verdnatura Levante SL",
"description": "MySQL Version Control",
"license": "GPL-3.0",

View File

@ -34,9 +34,11 @@ COPY \
structure.sql \
myvc.js \
myvc-push.js \
lib.js \
myvc.default.yml \
db.ini \
./
COPY exporters exporters
RUN ln -s /myvc/myvc.js /usr/local/bin/myvc
WORKDIR /workspace