##// END OF EJS Templates
js: use builtin packages for binaries...
marcink -
r3162:6f71dda2 default
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -36,6 +36,7 b' syntax: regexp'
36 36 ^htmlcov
37 37 ^junit\.xml$
38 38 ^node_modules/
39 ^node_binaries/
39 40 ^pylint.log$
40 41 ^rcextensions/
41 42 ^result$
@@ -1,9 +1,9 b''
1 1
2 2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build
3 3
4 WEBPACK=./node_modules/webpack/bin/webpack.js
5 GRUNT=grunt
6 4 NODE_PATH=./node_modules
5 WEBPACK=./node_binaries/webpack
6 GRUNT=./node_binaries/grunt
7 7
8 8
9 9 clean:
@@ -54,7 +54,7 b' let'
54 54 in
55 55 !builtins.elem (basename path) [
56 56 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
57 "bower_components" "node_modules"
57 "bower_components" "node_modules" "node_binaries"
58 58 "build" "data" "result" "tmp"] &&
59 59 !builtins.elem ext ["egg-info" "pyc"] &&
60 60 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
@@ -111,20 +111,25 b' let'
111 111 linkNodeAndBowerPackages = ''
112 112 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
113 113
114 echo "[BEGIN]: Link node packages"
115 rm -fr node_modules
116 mkdir node_modules
114 echo "[BEGIN]: Link node packages and binaries"
117 115 # johbo: Linking individual packages allows us to run "npm install"
118 116 # inside of a shell to try things out. Re-entering the shell will
119 117 # restore a clean environment.
118 rm -fr node_modules
119 mkdir node_modules
120 120 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
121 echo "[DONE]: Link node packages"
121 export NODE_PATH=./node_modules
122
123 rm -fr node_binaries
124 mkdir node_binaries
125 ln -s ${nodeDependencies}/bin/* node_binaries/
126 echo "[DONE ]: Link node packages and binaries"
122 127
123 128 echo "[BEGIN]: Link bower packages"
124 129 rm -fr bower_components
125 130 mkdir bower_components
126 131 ln -s ${bowerComponents}/bower_components/* bower_components/
127 echo "[DONE]: Link bower packages"
132 echo "[DONE ]: Link bower packages"
128 133 '';
129 134
130 135 releaseName = "RhodeCodeEnterpriseCE-${version}";
@@ -154,8 +159,6 b' let'
154 159 buildInputs =
155 160 attrs.buildInputs or [] ++ [
156 161 rhodecode-testdata
157 pkgs.nodePackages.bower
158 pkgs.nodePackages.grunt-cli
159 162 ];
160 163
161 164 #NOTE: option to inject additional propagatedBuildInputs
@@ -188,10 +191,12 b' let'
188 191 '';
189 192
190 193 preBuild = ''
191 echo "Building frontend assets"
194 echo "[BEGIN]: Building frontend assets"
192 195 ${linkNodeAndBowerPackages}
193 grunt
196 make web-build
194 197 rm -fr node_modules
198 rm -fr node_binaries
199 echo "[DONE ]: Building frontend assets"
195 200 '';
196 201
197 202 postInstall = ''
@@ -208,14 +213,14 b' let'
208 213 echo "Writing enterprise-ce meta information for rccontrol to nix-support/rccontrol"
209 214 mkdir -p $out/nix-support/rccontrol
210 215 cp -v rhodecode/VERSION $out/nix-support/rccontrol/version
211 echo "[DONE]: enterprise-ce meta information for rccontrol written"
216 echo "[DONE ]: enterprise-ce meta information for rccontrol written"
212 217
213 218 mkdir -p $out/etc
214 219 cp configs/production.ini $out/etc
215 echo "[DONE]: saved enterprise-ce production.ini into $out/etc"
220 echo "[DONE ]: saved enterprise-ce production.ini into $out/etc"
216 221
217 222 cp -r rhodecode/config/rcextensions $out/etc/rcextensions.tmpl
218 echo "[DONE]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
223 echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
219 224
220 225 # python based programs need to be wrapped
221 226 mkdir -p $out/bin
@@ -230,7 +235,7 b' let'
230 235 ln -s ${self.pyramid}/bin/prequest $out/bin/
231 236 ln -s ${self.pyramid}/bin/pserve $out/bin/
232 237
233 echo "[DONE]: created symlinks into $out/bin"
238 echo "[DONE ]: created symlinks into $out/bin"
234 239 DEPS="$out/bin/supervisorctl \
235 240 $out/bin/supervisord \
236 241 $out/bin/paster \
@@ -250,7 +255,7 b' let'
250 255 --set PYTHONHASHSEED random
251 256 done
252 257
253 echo "[DONE]: enterprise-ce binary wrapping"
258 echo "[DONE ]: enterprise-ce binary wrapping"
254 259
255 260 # rhodecode-tools don't need wrapping
256 261 ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/
@@ -9,25 +9,28 b''
9 9 "url" : "https://code.rhodecode.com/rhodecode-enterprise-ce"
10 10 },
11 11 "devDependencies": {
12 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1",
13 "bower": "^1.8.4",
14 "clipboard": "^2.0.1",
15 "exports-loader": "^0.6.4",
16 "favico.js": "^0.3.10",
12 17 "grunt": "^0.4.5",
18 "grunt-cli": "^1.3.1",
19 "grunt-contrib-concat": "^0.5.1",
13 20 "grunt-contrib-copy": "^1.0.0",
14 "grunt-contrib-concat": "^0.5.1",
15 21 "grunt-contrib-jshint": "^0.12.0",
16 22 "grunt-contrib-less": "^1.1.0",
17 23 "grunt-contrib-watch": "^0.6.1",
18 "vulcanize": "^1.16.0",
19 24 "grunt-vulcanize": "^1.0.0",
20 "node2nix": "^1.0.0",
25 "jquery": "1.11.3",
21 26 "jshint": "^2.9.1-rc3",
22 "bower": "^1.8.4",
23 "jquery": "1.11.3",
24 "favico.js": "^0.3.10",
25 "clipboard": "^2.0.1",
26 "qrious": "^4.0.2",
27 27 "moment": "^2.18.1",
28 28 "mousetrap": "^1.6.1",
29 "qrious": "^4.0.2",
29 30 "sticky-sidebar": "3.3.1",
31 "vulcanize": "^1.16.0",
30 32 "waypoints": "4.0.1",
31 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1"
33 "webpack": "4.23.1",
34 "webpack-cli": "3.1.2"
32 35 }
33 36 }
@@ -30,17 +30,17 b' NodeJS dependencies'
30 30 Generate node-packages.nix file with all dependencies from NPM and package.json file
31 31 This should be run before entering nix-shell.
32 32
33 The sed at the end fixex a bug with http rewrite of re-generated packages
34
33 35 .. code:: shell
34 36
35 rm -rf node_modules
37 rm -rf node_modules &&
36 38 nix-shell pkgs/shell-generate.nix --command "
37 39 node2nix --input package.json \
38 40 -o pkgs/node-packages.nix \
39 41 -e pkgs/node-env.nix \
40 42 -c pkgs/node-default.nix \
41 -d --flatten --nodejs-8 "
42
43 # fix bug with http rewrite of re-generated packages
43 -d --flatten --nodejs-8 " &&
44 44 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
45 45
46 46
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now