File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " gitlab-ci-local" ,
3
3
"main" : " index.js" ,
4
+ "version" : " 3.0.1" ,
4
5
"scripts" : {
5
6
"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" ,
6
7
"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" ,
12
13
"lint" : " tslint --project ." ,
13
14
"lint-fix" : " tslint --fix --project ." ,
14
15
"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 " ,
16
17
"test-exec-never-job" : " node -r source-map-support/register dist/index.js exec never_job --cwd tests/test-yml-spec"
17
18
},
18
19
"bin" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ Array.prototype.first = function() {
22
22
23
23
const argv = yargs . argv ;
24
24
const cwd = String ( argv . cwd || process . cwd ( ) ) ;
25
+ yargs . alias ( "v" , "version" ) ;
26
+ yargs . version ( JSON . parse ( fs . readFileSync ( `${ cwd } /package.json` , "UTF8" ) ) . version ) ;
25
27
const m : any = argv . m ;
26
28
const manualArgs : string [ ] = [ ] . concat ( m || [ ] ) ;
27
29
You can’t perform that action at this time.
0 commit comments