mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 21:45:43 +01:00
added publish command to ui-scripts
This commit is contained in:
26
scm-ui/ui-scripts/src/commands/publish.js
Normal file
26
scm-ui/ui-scripts/src/commands/publish.js
Normal file
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user