| OLD | NEW |
| 1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Set up the local directory to run the demo pages. | 5 # Set up the local directory to run the demo pages. |
| 6 | 6 |
| 7 default: | 7 default: |
| 8 bower install | 8 bower install |
| 9 | 9 |
| 10 # Run a local HTTP server for the demo pages. | 10 # Run a local HTTP server for the demo pages. |
| 11 .PHONY: run | 11 .PHONY: run |
| 12 run: default | 12 run: default common_strings |
| 13 -wget -nc --output-document=./res/imp/botlist/bot-list-demo.json https:/
/raw.githubusercontent.com/wiki/luci/luci-py/bot-list-demo.json | 13 -wget -nc --output-document=./res/imp/botlist/bot-list-demo.json https:/
/raw.githubusercontent.com/wiki/luci/luci-py/bot-list-demo.json |
| 14 -wget -nc --output-document=./res/imp/botlist/bot-list-fleet-data-demo.j
son https://raw.githubusercontent.com/wiki/luci/luci-py/bot-list-fleet-data-demo
.json | 14 -wget -nc --output-document=./res/imp/botlist/bot-list-fleet-data-demo.j
son https://raw.githubusercontent.com/wiki/luci/luci-py/bot-list-fleet-data-demo
.json |
| 15 -wget -nc --output-document=./res/imp/tasklist/task-list-demo.json https
://raw.githubusercontent.com/wiki/luci/luci-py/task-list-demo.json | 15 -wget -nc --output-document=./res/imp/tasklist/task-list-demo.json https
://raw.githubusercontent.com/wiki/luci/luci-py/task-list-demo.json |
| 16 -wget -nc --output-document=./res/imp/tasklist/task-list-fleet-data-demo
.json https://raw.githubusercontent.com/wiki/luci/luci-py/task-list-fleet-data-d
emo.json | 16 -wget -nc --output-document=./res/imp/tasklist/task-list-fleet-data-demo
.json https://raw.githubusercontent.com/wiki/luci/luci-py/task-list-fleet-data-d
emo.json |
| 17 -wget -nc --output-document=./res/imp/tasklist/task-tags-demo.json https
://raw.githubusercontent.com/wiki/luci/luci-py/task-tags-demo.json | 17 -wget -nc --output-document=./res/imp/tasklist/task-tags-demo.json https
://raw.githubusercontent.com/wiki/luci/luci-py/task-tags-demo.json |
| 18 | 18 |
| 19 -wget -nc --output-document=./res/imp/botpage/bot-demo.json https://raw.
githubusercontent.com/wiki/luci/luci-py/bot-demo.json | 19 -wget -nc --output-document=./res/imp/botpage/bot-demo.json https://raw.
githubusercontent.com/wiki/luci/luci-py/bot-demo.json |
| 20 -wget -nc --output-document=./res/imp/botpage/bot-events-demo.json https
://raw.githubusercontent.com/wiki/luci/luci-py/bot-events-demo.json | 20 -wget -nc --output-document=./res/imp/botpage/bot-events-demo.json https
://raw.githubusercontent.com/wiki/luci/luci-py/bot-events-demo.json |
| 21 -wget -nc --output-document=./res/imp/botpage/bot-tasks-demo.json https:
//raw.githubusercontent.com/wiki/luci/luci-py/bot-tasks-demo.json | 21 -wget -nc --output-document=./res/imp/botpage/bot-tasks-demo.json https:
//raw.githubusercontent.com/wiki/luci/luci-py/bot-tasks-demo.json |
| 22 | 22 |
| 23 -wget -nc --output-document=./res/imp/taskpage/task-request-demo.json ht
tps://raw.githubusercontent.com/wiki/luci/luci-py/task-request-demo.json | 23 -wget -nc --output-document=./res/imp/taskpage/task-request-demo.json ht
tps://raw.githubusercontent.com/wiki/luci/luci-py/task-request-demo.json |
| 24 -wget -nc --output-document=./res/imp/taskpage/task-result-demo.json htt
ps://raw.githubusercontent.com/wiki/luci/luci-py/task-result-demo.json | 24 -wget -nc --output-document=./res/imp/taskpage/task-result-demo.json htt
ps://raw.githubusercontent.com/wiki/luci/luci-py/task-result-demo.json |
| 25 -wget -nc --output-document=./res/imp/taskpage/task-stdout-demo.json htt
ps://raw.githubusercontent.com/wiki/luci/luci-py/task-stdout-demo.json | 25 -wget -nc --output-document=./res/imp/taskpage/task-stdout-demo.json htt
ps://raw.githubusercontent.com/wiki/luci/luci-py/task-stdout-demo.json |
| 26 -wget -nc --output-document=./res/imp/taskpage/milo-sample.html https://
raw.githubusercontent.com/wiki/luci/luci-py/milo-sample.html | 26 -wget -nc --output-document=./res/imp/taskpage/milo-sample.html https://
raw.githubusercontent.com/wiki/luci/luci-py/milo-sample.html |
| 27 -wget -nc --output-document=./res/imp/taskpage/new-task-demo.json https:
//raw.githubusercontent.com/wiki/luci/luci-py/new-task-demo.json | 27 -wget -nc --output-document=./res/imp/taskpage/new-task-demo.json https:
//raw.githubusercontent.com/wiki/luci/luci-py/new-task-demo.json |
| 28 | 28 |
| 29 -wget -nc --output-document=./res/imp/index/index-overview-stats-demo.js
on https://raw.githubusercontent.com/wiki/luci/luci-py/index-overview-stats-demo
.json | 29 -wget -nc --output-document=./res/imp/index/index-overview-stats-demo.js
on https://raw.githubusercontent.com/wiki/luci/luci-py/index-overview-stats-demo
.json |
| 30 -wget -nc --output-document=./res/imp/stats/stats-overview-demo.json htt
ps://raw.githubusercontent.com/wiki/luci/luci-py/stats/stats-overview-demo.json | 30 -wget -nc --output-document=./res/imp/stats/stats-overview-demo.json htt
ps://raw.githubusercontent.com/wiki/luci/luci-py/stats/stats-overview-demo.json |
| 31 | 31 |
| 32 node_modules/.bin/http-server -p 9050 | 32 node_modules/.bin/http-server -p 9050 |
| 33 | 33 |
| 34 .PHONY: clean |
| 35 clean: |
| 36 rm -rf ./build/* |
| 37 mkdir ./build/js |
| 34 | 38 |
| 35 .PHONY: vulcanize | 39 .PHONY: vulcanize |
| 36 vulcanize: default | 40 vulcanize: clean default common_strings |
| 37 » rm -rf ./build/* | |
| 38 » mkdir ./build/js | |
| 39 ./node_modules/.bin/vulcanize --inline-css --inline-scripts --strip-comm
ents --abspath=./ elements.html | ./node_modules/.bin/html-minifier -o ./build/e
lements.html --minify-css --minify-js --remove-comments --collapse-whitespace --
conservative-collapse | 41 ./node_modules/.bin/vulcanize --inline-css --inline-scripts --strip-comm
ents --abspath=./ elements.html | ./node_modules/.bin/html-minifier -o ./build/e
lements.html --minify-css --minify-js --remove-comments --collapse-whitespace --
conservative-collapse |
| 40 » cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js
./node_modules/skia-common-js/common.js ./res/js/common.js ./res/js/alias.js |
./node_modules/.bin/uglifyjs -o ./build/js/js.js | 42 » cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js
./build/js/common-strings.js ./node_modules/skia-common-js/common.js ./res/js/c
ommon.js ./res/js/alias.js | ./node_modules/.bin/uglifyjs -o ./build/js/js.js |
| 41 | 43 |
| 42 .PHONY: debug_build | 44 .PHONY: debug_build |
| 43 debug_build: default | 45 debug_build: clean default common_strings |
| 44 » rm -rf ./build/* | |
| 45 » mkdir ./build/js | |
| 46 cp elements.html ./build/elements.html | 46 cp elements.html ./build/elements.html |
| 47 » cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js
./node_modules/skia-common-js/common.js ./res/js/common.js ./res/js/alias.js >
./build/js/js.js | 47 » cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js
./build/js/common-strings.js ./node_modules/skia-common-js/common.js ./res/js/c
ommon.js ./res/js/alias.js > ./build/js/js.js |
| 48 ln --symbolic ../res/imp/ ./build/ | 48 ln --symbolic ../res/imp/ ./build/ |
| 49 | 49 |
| 50 .PHONY: common_strings |
| 51 common_strings: |
| 52 echo "(function(){var customUtils = {};" > ./build/js/common-strings.js |
| 53 cat node_modules/common-substrings/lib/customUtils.js node_modules/commo
n-substrings/lib/bst.js node_modules/common-substrings/lib/commonSubstrings.js >
> ./build/js/common-strings.js |
| 54 echo "window.Substrings = SuffixTrie;})();" >> ./build/js/common-strings
.js |
| 55 # Remove require-js related things. |
| 56 sed -i -e 's/module.exports.getRandomArray/customUtils.getRandomArray/g'
./build/js/common-strings.js |
| 57 sed -i -e 's/module.exports.defaultCompareKeysFunction/customUtils.defau
ltCompareKeysFunction/g' ./build/js/common-strings.js |
| 58 sed -i -e 's/module.exports.defaultCheckValueEquality/customUtils.defaul
tCheckValueEquality/g' ./build/js/common-strings.js |
| 59 sed -i -e 's/var customUtils = require.*/ /g' ./build/js/common-strings.
js |
| 60 sed -i -e 's/module.exports = BinarySearchTree;/ /g' ./build/js/common-s
trings.js |
| 61 sed -i -e 's/var BinarySearchTree = require.*/ /g' ./build/js/common-str
ings.js |
| 62 sed -i -e 's/module.exports = SuffixTrie;/ /g' ./build/js/common-strings
.js |
| 63 |
| 64 |
| 50 .PHONY: dev_deploy | 65 .PHONY: dev_deploy |
| 51 dev_deploy: vulcanize | 66 dev_deploy: vulcanize |
| 52 ../tools/gae upl -A chromium-swarm-dev | 67 ../tools/gae upl -A chromium-swarm-dev |
| 53 | 68 |
| 54 .PHONY: deploy | 69 .PHONY: deploy |
| 55 deploy: vulcanize | 70 deploy: vulcanize |
| 56 ../tools/gae upl -A chromium-swarm | 71 ../tools/gae upl -A chromium-swarm |
| 57 | 72 |
| 58 .PHONY: local_deploy | 73 .PHONY: local_deploy |
| 59 local_deploy: vulcanize | 74 local_deploy: vulcanize |
| 60 ../tools/start_servers.py | 75 ../tools/start_servers.py |
| 61 | 76 |
| 62 .PHONY: debug_local_deploy | 77 .PHONY: debug_local_deploy |
| 63 debug_local_deploy: debug_build | 78 debug_local_deploy: debug_build |
| 64 » ../tools/start_servers.py | 79 » ../tools/start_servers.py |
| 80 |
| 81 .PHONY: debug_dev_deploy |
| 82 debug_dev_deploy: debug_build |
| 83 » ../tools/gae upl -A chromium-swarm-dev |
| OLD | NEW |