File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ RUN apk add --update git curl jq py-pip && pip install yq
5
5
WORKDIR /cf-cli
6
6
7
7
COPY package.json /cf-cli
8
+ COPY check-version.js /cf-cli
8
9
9
10
RUN yarn --prod install
10
11
Original file line number Diff line number Diff line change
1
+ const semver = require ( 'semver' ) ;
2
+ const { engines } = require ( './package' ) ;
3
+
4
+ const version = engines . node ;
5
+ if ( ! semver . satisfies ( process . version , version ) ) {
6
+ throw new Error ( `Required node version ${ version } not satisfied with current version ${ process . version } .` ) ;
7
+ }
8
+
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.13.0 " ,
3
+ "version" : " 0.13.1 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
13
13
"serve-docs" : " yarn build-local-docs && cd temp && hugo server -D" ,
14
14
"serve-docs-beta" : " ALLOW_BETA_COMMANDS=true yarn build-local-docs && cd temp && hugo server -D" ,
15
15
"build-local-docs" : " node ./docs/index.js" ,
16
- "build-public-docs" : " node ./docs/index.js && cd temp && hugo"
16
+ "build-public-docs" : " node ./docs/index.js && cd temp && hugo" ,
17
+ "check-node-version" : " node check-version.js" ,
18
+ "postinstall" : " npm run check-node-version"
17
19
},
18
20
"bin" : {
19
21
"codefresh" : " ./lib/interface/cli/codefresh"
60
62
"request-promise" : " ^4.2.2" ,
61
63
"requestretry" : " ^3.1.0" ,
62
64
"rimraf" : " ^2.6.2" ,
65
+ "semver" : " ^5.6.0" ,
63
66
"tty-table" : " ^2.5.5" ,
64
67
"uuid" : " ^3.1.0" ,
65
68
"yargs" : " ^10.0.3"
81
84
"author" : " Codefresh" ,
82
85
"license" : " ISC" ,
83
86
"engines" : {
84
- "node" : " >8.0.0"
87
+ "node" : " >= 8.0.0"
85
88
},
86
89
"yargs" : {
87
90
"boolean-negation" : false
Original file line number Diff line number Diff line change @@ -4568,6 +4568,11 @@ semver@5.3.0:
4568
4568
version "5.3.0"
4569
4569
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
4570
4570
4571
+ semver@^5.6.0 :
4572
+ version "5.6.0"
4573
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
4574
+ integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
4575
+
4571
4576
semver@~5.0.1 :
4572
4577
version "5.0.3"
4573
4578
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
You can’t perform that action at this time.
0 commit comments