wicked-cli
Version:
wicked.haufe.io Command Line Tool
28 lines (22 loc) • 627 B
JavaScript
;
const program = require('commander');
const tags = require('../impl/tags-impl');
let didAction = false;
program
.option('-f, --force', 'specify this to avoid checking whether a tag is available')
.arguments('<tag>', 'the tag to set as the current tag')
.action((tag) => {
didAction = true;
tags.setCurrentTag(tag, program.force, (err) => {
if (err) {
console.error(err);
process.exit(1);
}
process.exit(0);
});
})
.parse(process.argv);
if (!didAction) {
program.help();
}