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