Push.updateVersion() fixes
This commit is contained in:
parent
193588da45
commit
ad32530261
11
myvc-push.js
11
myvc-push.js
|
@ -201,7 +201,7 @@ class Push {
|
||||||
nChanges++;
|
nChanges++;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.updateVersion(nChanges, 'number', versionNumber);
|
await this.updateVersion('number', versionNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ class Push {
|
||||||
const head = await repo.getHeadCommit();
|
const head = await repo.getHeadCommit();
|
||||||
|
|
||||||
if (version.gitCommit !== head.sha())
|
if (version.gitCommit !== head.sha())
|
||||||
await this.updateVersion(nRoutines, 'gitCommit', head.sha());
|
await this.updateVersion('gitCommit', head.sha());
|
||||||
|
|
||||||
// Update and release
|
// Update and release
|
||||||
|
|
||||||
|
@ -339,10 +339,7 @@ class Push {
|
||||||
return routines;
|
return routines;
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateVersion(nChanges, column, value) {
|
async updateVersion(column, value) {
|
||||||
if (nChanges == 0) return;
|
|
||||||
const {opts} = this;
|
|
||||||
|
|
||||||
column = this.conn.escapeId(column, true);
|
column = this.conn.escapeId(column, true);
|
||||||
await this.conn.query(
|
await this.conn.query(
|
||||||
`INSERT INTO version
|
`INSERT INTO version
|
||||||
|
@ -353,7 +350,7 @@ class Push {
|
||||||
${column} = VALUES(${column}),
|
${column} = VALUES(${column}),
|
||||||
updated = VALUES(updated)`,
|
updated = VALUES(updated)`,
|
||||||
[
|
[
|
||||||
opts.code,
|
this.opts.code,
|
||||||
value
|
value
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "myvc",
|
"name": "myvc",
|
||||||
"version": "1.2.8",
|
"version": "1.2.9",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL Version Control",
|
"description": "MySQL Version Control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue