mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-29 09:36:10 +01:00
Do not fork ui-script commands
Forking of the commands could lead to open processes, even if the parent was stopped with ctrl+c.
This commit is contained in:
committed by
René Pfeuffer
parent
0a4b5d0439
commit
d8a04a1113
@@ -24,26 +24,22 @@
|
||||
const lerna = require("../lerna");
|
||||
const versions = require("../versions");
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
if (args.length < 1) {
|
||||
console.log("usage ui-scripts publish <version>");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const version = args[0];
|
||||
const index = version.indexOf("-SNAPSHOT");
|
||||
if (index > 0) {
|
||||
const snapshotVersion = version.substring(0, index) + "-" + versions.createSnapshotVersion();
|
||||
console.log("publish snapshot release " + snapshotVersion);
|
||||
lerna.version(snapshotVersion);
|
||||
lerna.publish();
|
||||
lerna.version(version);
|
||||
} else {
|
||||
// ?? not sure
|
||||
lerna.publish();
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = args => {
|
||||
if (args.length < 1) {
|
||||
console.log("usage ui-scripts publish <version>");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const version = args[0];
|
||||
const index = version.indexOf("-SNAPSHOT");
|
||||
if (index > 0) {
|
||||
const snapshotVersion = `${version.substring(0, index)}-${versions.createSnapshotVersion()}`;
|
||||
console.log(`publish snapshot release ${snapshotVersion}`);
|
||||
lerna.version(snapshotVersion);
|
||||
lerna.publish();
|
||||
lerna.version(version);
|
||||
} else {
|
||||
// ?? not sure
|
||||
lerna.publish();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user