File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " gitlab-ci-local" ,
33 "main" : " index.js" ,
4+ "version" : " 3.0.1" ,
45 "scripts" : {
56 "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" ,
67 "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" ,
1213 "lint" : " tslint --project ." ,
1314 "lint-fix" : " tslint --fix --project ." ,
1415 "ncu" : " ncu --semverLevel major -e 2" ,
15- "test-yml-spec" : " node -r source-map-support/register dist/index.js manual manual_job_invoked_from_cli --cwd tests/test-yml-spec" ,
16+ "test-yml-spec" : " node -r source-map-support/register dist/index.js manual manual_job_invoked_from_cli --cwd tests/test-yml-spec --version " ,
1617 "test-exec-never-job" : " node -r source-map-support/register dist/index.js exec never_job --cwd tests/test-yml-spec"
1718 },
1819 "bin" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ Array.prototype.first = function() {
2222
2323const argv = yargs . argv ;
2424const cwd = String ( argv . cwd || process . cwd ( ) ) ;
25+ yargs . alias ( "v" , "version" ) ;
26+ yargs . version ( JSON . parse ( fs . readFileSync ( `${ cwd } /package.json` , "UTF8" ) ) . version ) ;
2527const m : any = argv . m ;
2628const manualArgs : string [ ] = [ ] . concat ( m || [ ] ) ;
2729
You can’t perform that action at this time.
0 commit comments