@@ -21,15 +21,31 @@ functions:
21
21
- command : git.apply_patch
22
22
params :
23
23
directory : src
24
- " npm install " :
24
+ " upgrade npm " :
25
25
- command : shell.exec
26
26
params :
27
27
working_dir : src
28
28
script : |
29
29
set -o errexit
30
30
set -o verbose
31
- export PATH="$PATH:${add_path|}"
31
+ export PATH="$PATH:${node_path|}"
32
+ test -n "${add_environment|}" && export "${add_environment|}"
33
+
34
+ if [ -z "${npm_version|}" ]
35
+ then
36
+ echo "upgrade_npm: npm_version is unset; skipping"
37
+ exit 0
38
+ fi
39
+ ${npm|npm} install -g npm@${npm_version|xx}
40
+ " npm install" :
41
+ - command : shell.exec
42
+ params :
43
+ working_dir : src
44
+ script : |
45
+ set -v -e
46
+ export PATH="$PATH:${node_path|}"
32
47
test -n "${add_environment|}" && export "${add_environment|}"
48
+ export PATH="`npm -g bin`:$PATH"
33
49
${node|node} --version
34
50
${npm|npm} --version
35
51
${npm|npm} install
@@ -38,30 +54,30 @@ functions:
38
54
params :
39
55
working_dir : src
40
56
script : |
41
- set -o errexit
42
- set -o verbose
43
- export PATH="$PATH:${add_path|}"
57
+ set -v -e
58
+ export PATH="$PATH:${node_path|}"
44
59
test -n "${add_environment|}" && export "${add_environment|}"
60
+ export PATH="`npm -g bin`:$PATH"
45
61
${npm|npm} run test
46
62
" npm check" :
47
63
- command : shell.exec
48
64
params :
49
65
working_dir : src
50
66
script : |
51
- set -o errexit
52
- set -o verbose
53
- export PATH="$PATH:${add_path|}"
67
+ set -v -e
68
+ export PATH="$PATH:${node_path|}"
54
69
test -n "${add_environment|}" && export "${add_environment|}"
70
+ export PATH="`npm -g bin`:$PATH"
55
71
${npm|npm} run check
56
72
" npm release" :
57
73
- command : shell.exec
58
74
params :
59
75
working_dir : src
60
76
script : |
61
- set -o errexit
62
- set -o verbose
63
- export PATH="$PATH:${add_path|}"
77
+ set -v -e
78
+ export PATH="$PATH:${node_path|}"
64
79
test -n "${add_environment|}" && export "${add_environment|}"
80
+ export PATH="`npm -g bin`:$PATH"
65
81
${npm|npm} run release
66
82
67
83
# ######################################
73
89
depends_on : []
74
90
commands :
75
91
- func : " fetch source"
92
+ - func : " upgrade npm"
76
93
- func : " npm install"
77
94
- func : " npm test"
78
95
# - func: "npm check"
@@ -107,7 +124,7 @@ buildvariants:
107
124
- " osx-108"
108
125
expansions :
109
126
add_environment : " SCOUT_INSTALLER_UNSIGNED=1"
110
- add_path : /opt/node/bin
127
+ node_path : /opt/node/bin
111
128
installer_content_type : " application/x-apple-diskimage"
112
129
installer_filename : " MongoDB Scout.dmg"
113
130
num_cores : $(sysctl -n hw.logicalcpu)
@@ -122,10 +139,11 @@ buildvariants:
122
139
- " windows-64-vs2013-test"
123
140
expansions :
124
141
add_environment : " APPDATA=C:\\ Program Files (x86)\\ nodejs\\ node_modules"
125
- add_path : " /cygdrive/c/Program Files (x86)/nodejs"
142
+ node_path : " /cygdrive/c/Program Files (x86)/nodejs"
126
143
installer_content_type : " application/octet-stream"
127
- installer_filename : " MongoDB Scout .exe"
144
+ installer_filename : " MongoDBScoutSetup .exe"
128
145
exe : " .exe"
146
+ npm_version : " 3"
129
147
num_cores : $(grep -c ^processor /proc/cpuinfo)
130
148
tasks :
131
149
- name : compile
@@ -140,7 +158,7 @@ buildvariants:
140
158
# - "ubuntu1404-test"
141
159
# expansions:
142
160
# add_environment: ""
143
- # add_path : "/opt/node/bin"
161
+ # node_path : "/opt/node/bin"
144
162
# compile_env: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
145
163
# num_cores: $(grep -c ^processor /proc/cpuinfo)
146
164
# tasks:
0 commit comments