Skip to content

Commit e45fd1e

Browse files
committed
Fetch automation script via npm
1 parent 45d9a7c commit e45fd1e

File tree

3 files changed

+11
-35
lines changed

3 files changed

+11
-35
lines changed

.travis.yml

+8-35
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,22 @@ language: node_js
33
node_js:
44
- '0.10'
55
- '0.12'
6+
before_install:
7+
- npm install -g npm@latest
68
before_script:
79
- npm install grunt-cli -g
810
- export CI_BUILD_NUMBER=$(git rev-parse HEAD)
911
- if [ "${TRAVIS_NODE_VERSION}" = "0.12" ] && [ "${TRAVIS_REPO_SLUG}" = "modernizr-savage/Modernizr" ]; then export BROWSER_COVERAGE=true; fi
1012
after_success:
11-
- python travis_after_all.py
12-
- export $(cat .to_export_back) &> /dev/null
1313
- |
14-
# If all the tests pass in all the runtimes, make Travis
15-
# automatically download and execute the following script
16-
17-
if [ "$BUILD_LEADER" == "YES" ]; then
18-
if [ "$BUILD_AGGREGATE_STATUS" == "others_succeeded" ]; then \
19-
20-
# Clean up helper files
21-
rm -rf travis_after_all.py .to_export_back && \
22-
23-
# The `update_site_branch.sh` script will run the build,
24-
# and if that generates changes, it will commit them to the
25-
# `master` branch:
26-
#
27-
# * ensuring that the content from the `gh-pages/` directory
28-
# is always in sync with the rest of the content
29-
#
30-
# * removing the need to execute the build step locally
31-
# everytime a change is made (especially in the case
32-
# of trivial changes such as typos)
33-
#
34-
# Note: The `update_site_branch.sh` script will only run
35-
# if the commit was made to the `master` branch.
36-
37-
curl -sSL "https://raw.githubusercontent.com/h5bp-bot/scripts/0.6.1/update_site_branch.sh" |
38-
bash -s -- --commands "grunt copy:gh-pages" \
39-
--commit-message "Hey server, this content is for you! [skip ci]" \
40-
--directory "gh-pages" \
41-
--distribution-branch "gh-pages" \
42-
--source-branch "master";
43-
fi
44-
fi
45-
14+
# Automatically update the content from the `gh-pages` branch
15+
$(npm bin)/update-branch --commands "grunt copy:gh-pages" \
16+
--commit-message "Hey server, this content is for you! [skip ci]" \
17+
--directory "gh-pages" \
18+
--distribution-branch "gh-pages" \
19+
--source-branch "master"
4620
script:
4721
- grunt test
48-
- curl -sSLo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
4922
notifications:
5023
webhooks:
5124
- http://patrickkettner.com:8080/savage/travis

appveyor.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ environment:
66
# Get the latest stable version of Node 0.STABLE.latest
77
install:
88
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
9+
- npm install -g npm@latest
10+
- set PATH=%APPDATA%\npm;%PATH%
911
- npm install
1012

1113
build: off

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"yargs": "^2.3.0"
1717
},
1818
"devDependencies": {
19+
"@alrra/travis-scripts": "^1.1.0",
1920
"expect.js": "^0.3.1",
2021
"grunt": "~0.4.0",
2122
"grunt-contrib-clean": "~0.4.0",

0 commit comments

Comments
 (0)