git-release-manager
Version:
A tool to generate release notes from git commit history
33 lines • 1.64 kB
JavaScript
;
var _a, _b, _c;
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
const fs_1 = require("fs");
const path_1 = require("path");
const command_1 = require("./commands/commit/command");
const command_2 = require("./commands/changelog/command");
const command_3 = require("./commands/branch/command");
const command_4 = require("./commands/version/command");
const command_5 = require("./commands/flow/command");
const packageJson = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, "../package.json"), "utf8"));
const program = new commander_1.Command();
program
.name((_a = packageJson.name) !== null && _a !== void 0 ? _a : "Git Release Manager")
.description((_b = packageJson.description) !== null && _b !== void 0 ? _b : "Tools to manage your git releases and versioning")
.version((_c = packageJson.version) !== null && _c !== void 0 ? _c : "0.0.0", "-v, --version", "Show the current version number")
.helpOption("-h, --help", "Display help information");
program
.option("--config <path>", "Specify a custom config file path")
.option("--environment <env>", "Set a specific environment to use");
(0, command_1.createCommitCommand)(program);
(0, command_2.createChangelogCommand)(program);
(0, command_3.createBranchCommand)(program);
(0, command_4.createVersionCommand)(program);
(0, command_5.createFlowCommand)(program);
program.action(() => {
console.log("Please specify a command or use --help for usage information");
process.exit(1);
});
program.parse(process.argv);
//# sourceMappingURL=index.js.map