fix: 修正 git commit 时出错的问题
怀疑是因为单个命令的响应时间过长或负载过重而被 kill 了,改成分批添加和提交文件后问题解决
This commit is contained in:
parent
bdb63b8de3
commit
d15b4822f8
23
.travis.yml
23
.travis.yml
@ -2,26 +2,21 @@ language: node_js
|
|||||||
sudo: false
|
sudo: false
|
||||||
dist: trusty
|
dist: trusty
|
||||||
node_js:
|
node_js:
|
||||||
- 10.13.0
|
- 10.13.0
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- g++-4.8
|
- g++-4.8
|
||||||
chrome: stable
|
chrome: stable
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- g3
|
- g3
|
||||||
cache:
|
cache: false
|
||||||
yarn: true
|
|
||||||
directories:
|
|
||||||
- "./node_modules"
|
|
||||||
- "./.chrome/chromium"
|
|
||||||
- "./aio/node_modules"
|
|
||||||
before_install:
|
before_install:
|
||||||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1
|
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1
|
||||||
- export PATH="$HOME/.yarn/bin:$PATH"
|
- export PATH="$HOME/.yarn/bin:$PATH"
|
||||||
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
|
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
|
||||||
script:
|
script:
|
||||||
- "./aio/deploy-cn.sh"
|
- "./aio/deploy-cn.sh"
|
||||||
|
@ -10,6 +10,16 @@ cd `dirname $0`
|
|||||||
|
|
||||||
yarn build
|
yarn build
|
||||||
|
|
||||||
|
yarn preview > /tmp/preview.log &
|
||||||
|
|
||||||
|
pid=$!
|
||||||
|
|
||||||
|
sleep 3;
|
||||||
|
|
||||||
|
node ./tools/translator/bin/prerender.js
|
||||||
|
|
||||||
|
kill -9 ${pid}
|
||||||
|
|
||||||
if [[ ! -d "./ng-docs.github.io" ]]
|
if [[ ! -d "./ng-docs.github.io" ]]
|
||||||
then
|
then
|
||||||
git clone https://asnowwolf:${GITHUB_ACCESS_TOKEN}@github.com/ng-docs/preview.angular.cn.git ./ng-docs.github.io
|
git clone https://asnowwolf:${GITHUB_ACCESS_TOKEN}@github.com/ng-docs/preview.angular.cn.git ./ng-docs.github.io
|
||||||
@ -19,8 +29,16 @@ cp -r dist/* ./ng-docs.github.io
|
|||||||
|
|
||||||
cd ./ng-docs.github.io
|
cd ./ng-docs.github.io
|
||||||
|
|
||||||
git add .
|
git add ./generated/docs/api/
|
||||||
git commit --allow-empty -am "${commitMessage}"
|
git commit --allow-empty -am "${commitMessage}"
|
||||||
|
git add ./generated/docs/guide/
|
||||||
|
git commit --amend --allow-empty -am "${commitMessage}"
|
||||||
|
git add ./generated/docs/
|
||||||
|
git commit --amend --allow-empty -am "${commitMessage}"
|
||||||
|
git add ./generated/images/
|
||||||
|
git commit --amend --allow-empty -am "${commitMessage}"
|
||||||
|
git add .
|
||||||
|
git commit --amend --allow-empty -am "${commitMessage}"
|
||||||
|
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user