dump command fixes
This commit is contained in:
parent
7b55e54091
commit
45ea00f7d1
14
myvc-push.js
14
myvc-push.js
|
@ -208,9 +208,11 @@ class Push {
|
|||
// Apply routines
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue