OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
| 5 # Allow overwriting application id, so one can deploy them with: |
| 6 # $ APP_ID='whatever' make deploy |
| 7 APP_ID ?= chromium-cq-status |
5 NPM_VERSION := $(shell npm --version 2>/dev/null) | 8 NPM_VERSION := $(shell npm --version 2>/dev/null) |
6 BOWER_VERSION := $(shell bower --version 2>/dev/null) | 9 BOWER_VERSION := $(shell bower --version 2>/dev/null) |
7 GIT_REVISION := $(shell git rev-parse --short HEAD) | 10 GIT_REVISION := $(shell git rev-parse --short HEAD) |
8 | 11 |
9 check: | 12 check: |
10 ifndef NPM_VERSION | 13 ifndef NPM_VERSION |
11 $(error npm not found. Install from nodejs.org or see README) | 14 $(error npm not found. Install from nodejs.org or see README) |
12 endif | 15 endif |
13 ifndef BOWER_VERSION | 16 ifndef BOWER_VERSION |
14 @echo "bower not found. Installing:"; | 17 @echo "bower not found. Installing:"; |
15 npm install -g bower | 18 npm install -g bower |
16 endif | 19 endif |
17 | 20 |
18 test: check | 21 test: check |
19 ./node_modules/karma/bin/karma start | 22 ./node_modules/karma/bin/karma start |
20 | 23 |
21 single-test: check | 24 single-test: check |
22 ./node_modules/karma/bin/karma start --single-run | 25 ./node_modules/karma/bin/karma start --single-run |
23 | 26 |
24 deploy: | 27 deploy: |
25 » appcfg.py --oauth2 update app.yaml highend.yaml --version `git rev-parse
--short HEAD` | 28 » appcfg.py -A $(APP_ID)--oauth2 update app.yaml highend.yaml --version $(
GIT_REVISION) |
| 29 |
| 30 # This is necesary if dispatch rules are updated or for new deployments. |
| 31 deploy-dispatch: |
| 32 » appcfg.py -A $(APP_ID) --oauth2 update_dispatch --version $(GIT_REVISION
) |
| 33 |
| 34 # This is necesary if index definition is updated or for new deployments. |
| 35 deploy-index: |
| 36 » appcfg.py -A $(APP_ID) --oauth2 update_index --version $(GIT_REVISION) |
| 37 |
26 | 38 |
27 .PHONY: check test single-test | 39 .PHONY: check test single-test |
OLD | NEW |