Skip to content

Commit

Permalink
Merge pull request #7 from moberghammer/add-version-option
Browse files Browse the repository at this point in the history
Added version option
  • Loading branch information
firecow authored Mar 6, 2020
2 parents fac75e5 + 4e297e6 commit eb3233f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "gitlab-ci-local",
"main": "index.js",
"version": "3.0.1",
"scripts": {
"build-linux": "pkg dist/index.js -t node12-linux-x64 -o ./bin/linux/gitlab-ci-local && gzip -c bin/linux/gitlab-ci-local > bin/linux.gz",
"build-macos": "pkg dist/index.js -t node12-macos-x64 -o ./bin/macos/gitlab-ci-local && gzip -c bin/macos/gitlab-ci-local > bin/macos.gz",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Array.prototype.first = function() {

const argv = yargs.argv;
const cwd = String(argv.cwd || process.cwd());
yargs.alias("v", "version");
yargs.version(JSON.parse(fs.readFileSync(`${cwd}/package.json`, "UTF8")).version);
const m: any = argv.m;
const manualArgs: string[] = [].concat(m || []);

Expand Down

0 comments on commit eb3233f

Please sign in to comment.