2019-10-16 08:08:37 +02:00
|
|
|
const lerna = require("../lerna");
|
|
|
|
|
const versions = require("../versions");
|
|
|
|
|
|
|
|
|
|
const args = process.argv.slice(2);
|
|
|
|
|
|
|
|
|
|
if (args.length < 1) {
|
2019-11-29 11:41:04 +01:00
|
|
|
console.log("usage ui-scripts publish <version>");
|
2019-10-16 08:08:37 +02:00
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|