Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit abe9dbe

Browse files
filipesilvawardbell
authored andcommitted
chore(ci): add check-deploy to CI
closes #1867
1 parent abd860c commit abe9dbe

File tree

7 files changed

+38
-18
lines changed

7 files changed

+38
-18
lines changed

.travis.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ env:
1010
- DBUS_SESSION_BUS_ADDRESS=/dev/null
1111
- DISPLAY=:99.0
1212
- CHROME_BIN=chromium-browser
13+
- LATEST_RELEASE=2.0.0-rc.4
1314
matrix:
14-
- SCRIPT=lint
15-
- SCRIPT="run-e2e-tests --fast"
16-
- SCRIPT="run-e2e-tests --fast" PREVIEW=true
15+
- TASK=lint
16+
- TASK="run-e2e-tests --fast" SCRIPT=examples-install.sh
17+
- TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh
18+
- TASK=harp-compile SCRIPT=deploy-install.sh
19+
- TASK=harp-compile SCRIPT=deploy-install-preview.sh
1720
matrix:
1821
fast_finish: true
1922
allow_failures:
20-
- env: "SCRIPT=\"run-e2e-tests --fast\" PREVIEW=true"
23+
- env: "TASK=\"run-e2e-tests --fast\" SCRIPT=examples-install-preview.sh"
24+
- env: "TASK=harp-compile SCRIPT=deploy-install-preview.sh"
2125
before_install:
2226
- npm install -g gulp --no-optional
27+
install:
28+
- npm install --no-optional
29+
- if [[ $SCRIPT ]]; then ./scripts/$SCRIPT; fi
2330
before_script:
2431
- sh -e /etc/init.d/xvfb start
25-
install:
26-
- ./scripts/install.sh
27-
- if [[ $PREVIEW == true ]]; then npm install --prefix public/docs/_examples angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,forms,router-deprecated,router,upgrade}-builds; fi
2832
script:
29-
- gulp $SCRIPT
33+
- gulp $TASK

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ This project generates a lot of untracked files, if you wish to reset it to a mi
117117

118118
- `git clean -xdf`
119119

120-
Also, there is a script available for Linux and OSX users that will setup the project using the steps shown in this section:
120+
Also, there is a script available for Linux, OSX and Windows Gitbash users that will setup the project using the steps shown in this section:
121121

122-
- `./scripts/install.sh`
122+
- `npm install --no-optional && ./scripts/examples-install.sh`
123123

124124
### Run with current build instead of release packages
125125
Can switch the `@angular` packages in `~/public/docs/_examples/node_modules` to the current build packages with

gulpfile.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -594,16 +594,16 @@ gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
594594
});
595595
});
596596

597+
gulp.task('harp-compile', ['build-docs'], function() {
598+
return harpCompile();
599+
});
600+
597601
gulp.task('check-deploy', ['build-docs'], function() {
598602
return harpCompile().then(function() {
599603
gutil.log('compile ok');
600-
if(argv.dryRun) {
601-
return false;
602-
} else {
603-
gutil.log('running live server ...');
604-
execPromise('npm run live-server ./www');
605-
return askDeploy();
606-
}
604+
gutil.log('running live server ...');
605+
execPromise('npm run live-server ./www');
606+
return askDeploy();
607607
}).then(function(shouldDeploy) {
608608
if (shouldDeploy) {
609609
gutil.log('deploying...');

scripts/deploy-install-preview.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex -o pipefail
4+
5+
./scripts/deploy-install.sh
6+
(cd ../angular && git checkout master)

scripts/deploy-install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex -o pipefail
4+
5+
(cd ../ && git clone https://github.com/angular/angular.git --branch $LATEST_RELEASE)

scripts/examples-install-preview.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex -o pipefail
4+
5+
./scripts/examples-install.sh
6+
(cd public/docs/_examples && npm install angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,forms,router-deprecated,router,upgrade}-builds --no-optional)

scripts/install.sh renamed to scripts/examples-install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
set -ex -o pipefail
44

5-
npm install --no-optional
65
(cd public/docs/_examples && npm install --no-optional)
76
(cd public/docs/_examples/_protractor && npm install --no-optional)
87
npm run webdriver:update --prefix public/docs/_examples/_protractor

0 commit comments

Comments
 (0)