chore(ci): use nvmrc & npmrc to set nodejs/npm version/options

This commit is contained in:
Łukasz Mierzwa
2018-09-25 20:11:30 +01:00
parent cdf9082046
commit 94579b9dc2
3 changed files with 3 additions and 4 deletions

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
save-exact=true

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
8.11.4

View File

@@ -7,9 +7,6 @@ defaults_go: &DEFAULTS_GO
defaults_js: &DEFAULTS_JS
language: node_js
# FIXME 8.12 includes npm 6.4.1 which generates a different lock file on
# macOS and Linux, causing diffs on CI and we fail builds when that happens
node_js: "8.11.4" # FIXME same in the 'Build and Deploy' stage
# install defaults to "npm install", which is done via make
install: []
cache:
@@ -65,7 +62,7 @@ jobs:
before_script:
# this stage needs to build everything including assets file and that
# requires running webpack, so we need nodejs here
- nvm install 8.11.4
- nvm install $(< .nvmrc)
script:
# compile assets via webpack and build those into bindata_assetfs.go file
- make bindata_assetfs.go