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
55WORKDIR /cf-cli
66
77COPY package.json /cf-cli
8+ COPY check-version.js /cf-cli
89
910RUN yarn --prod install
1011
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 11{
22 "name" : " codefresh" ,
3- "version" : " 0.13.0 " ,
3+ "version" : " 0.13.1 " ,
44 "description" : " Codefresh command line utility" ,
55 "main" : " index.js" ,
66 "preferGlobal" : true ,
1313 "serve-docs" : " yarn build-local-docs && cd temp && hugo server -D" ,
1414 "serve-docs-beta" : " ALLOW_BETA_COMMANDS=true yarn build-local-docs && cd temp && hugo server -D" ,
1515 "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"
1719 },
1820 "bin" : {
1921 "codefresh" : " ./lib/interface/cli/codefresh"
6062 "request-promise" : " ^4.2.2" ,
6163 "requestretry" : " ^3.1.0" ,
6264 "rimraf" : " ^2.6.2" ,
65+ "semver" : " ^5.6.0" ,
6366 "tty-table" : " ^2.5.5" ,
6467 "uuid" : " ^3.1.0" ,
6568 "yargs" : " ^10.0.3"
8184 "author" : " Codefresh" ,
8285 "license" : " ISC" ,
8386 "engines" : {
84- "node" : " >8.0.0"
87+ "node" : " >= 8.0.0"
8588 },
8689 "yargs" : {
8790 "boolean-negation" : false
Original file line number Diff line number Diff line change @@ -4568,6 +4568,11 @@ semver@5.3.0:
45684568 version "5.3.0"
45694569 resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
45704570
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+
45714576semver@~5.0.1 :
45724577 version "5.0.3"
45734578 resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
You can’t perform that action at this time.
0 commit comments