rebuild website on new version, automatically merge development branch with master - closes #1854, closes #1849
This commit is contained in:
parent
d4edce6559
commit
6ab57fd367
17
.travis.yml
17
.travis.yml
@ -3,17 +3,19 @@ cache:
|
||||
directories:
|
||||
- node_modules
|
||||
node_js:
|
||||
- '0.12'
|
||||
- "0.12"
|
||||
- iojs
|
||||
before_script: npm install -g codeclimate-test-reporter
|
||||
|
||||
before_script: ./tools/setup-git.sh
|
||||
script: make test-travis
|
||||
after_success: ./tools/merge-development-with-master.sh
|
||||
|
||||
notifications:
|
||||
slack: babeljs:5Wy4QX13KVkGy9CnU0rmvgeK
|
||||
|
||||
before_deploy:
|
||||
- make prepublish
|
||||
after_deploy:
|
||||
- make publish-cli
|
||||
- make publish-runtime
|
||||
|
||||
deploy:
|
||||
provider: npm
|
||||
email: sebmck@gmail.com
|
||||
@ -24,3 +26,8 @@ deploy:
|
||||
branch: master
|
||||
tags: true
|
||||
repo: babel/babel
|
||||
|
||||
after_deploy:
|
||||
- make publish-cli
|
||||
- make publish-runtime
|
||||
- make rebuild-website
|
||||
|
||||
5
Makefile
5
Makefile
@ -9,7 +9,7 @@ BROWSERIFY_IGNORE = -i esprima-fb
|
||||
|
||||
export NODE_ENV = test
|
||||
|
||||
.PHONY: clean test test-cov test-clean test-travis test-simple test-all test-browser test-parser publish build bootstrap publish-core publish-runtime build-core watch-core build-core-test clean-core prepublish
|
||||
.PHONY: clean test test-cov test-clean test-travis test-simple test-all test-browser test-parser publish build bootstrap publish-core publish-runtime build-website build-core watch-core build-core-test clean-core prepublish
|
||||
|
||||
build-core: clean-core
|
||||
node $(BABEL_CMD) src --out-dir lib --copy-files
|
||||
@ -105,6 +105,9 @@ publish-runtime:
|
||||
publish-cli:
|
||||
@./tools/publish-cli.sh
|
||||
|
||||
build-website:
|
||||
@./tools/build-website.sh
|
||||
|
||||
bootstrap:
|
||||
npm list --global --depth 1 babel >/dev/null 2>&1 && npm uninstall -g babel || true
|
||||
npm install
|
||||
|
||||
9
tools/build-website.sh
Executable file
9
tools/build-website.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
git clone git@github.com:babel/babel.github.io.git
|
||||
cd babel.github.io
|
||||
ln -s .. _babel
|
||||
make build
|
||||
git commit -am "${TRAVIS_TAG}"
|
||||
git push "https://${GH_TOKEN}@github.com/babel/babel.github.io"
|
||||
10
tools/merge-development-with-master.sh
Executable file
10
tools/merge-development-with-master.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ "$TRAVIS_BRANCH" != "development" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
git checkout master
|
||||
git merge "$TRAVIS_COMMIT"
|
||||
git push "https://${GH_TOKEN}@github.com/babel/babel"
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
LAST_TAG=$(git describe $(git rev-list --tags --max-count=1))
|
||||
TAG_DIFF=$(git diff $LAST_TAG -- packages/babel-cli/)
|
||||
|
||||
5
tools/setup-git.sh
Normal file
5
tools/setup-git.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
git config user.name "sebmckbot"
|
||||
git config user.email "sebmckbbot@gmail.com"
|
||||
Loading…
x
Reference in New Issue
Block a user