Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN apk add --update git curl jq py-pip && pip install yq
WORKDIR /cf-cli

COPY package.json /cf-cli
COPY check-version.js /cf-cli

RUN yarn --prod install

Expand Down
8 changes: 8 additions & 0 deletions check-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const semver = require('semver');
const { engines } = require('./package');

const version = engines.node;
if (!semver.satisfies(process.version, version)) {
throw new Error(`Required node version ${version} not satisfied with current version ${process.version}.`);
}

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.13.0",
"version": "0.13.1",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand All @@ -13,7 +13,9 @@
"serve-docs": "yarn build-local-docs && cd temp && hugo server -D",
"serve-docs-beta": "ALLOW_BETA_COMMANDS=true yarn build-local-docs && cd temp && hugo server -D",
"build-local-docs": "node ./docs/index.js",
"build-public-docs": "node ./docs/index.js && cd temp && hugo"
"build-public-docs": "node ./docs/index.js && cd temp && hugo",
"check-node-version": "node check-version.js",
"postinstall": "npm run check-node-version"
},
"bin": {
"codefresh": "./lib/interface/cli/codefresh"
Expand Down Expand Up @@ -60,6 +62,7 @@
"request-promise": "^4.2.2",
"requestretry": "^3.1.0",
"rimraf": "^2.6.2",
"semver": "^5.6.0",
"tty-table": "^2.5.5",
"uuid": "^3.1.0",
"yargs": "^10.0.3"
Expand All @@ -81,7 +84,7 @@
"author": "Codefresh",
"license": "ISC",
"engines": {
"node": ">8.0.0"
"node": ">=8.0.0"
},
"yargs": {
"boolean-negation": false
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4568,6 +4568,11 @@ semver@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"

semver@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==

semver@~5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
Expand Down