代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/Micronaut 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
set -e
EXIT_STATUS=0
git config --global user.name "$GIT_NAME"
git config --global user.email "$GIT_EMAIL"
git config --global credential.helper "store --file=~/.git-credentials"
echo "https://$GH_TOKEN:@github.com" > ~/.git-credentials
if [[ $EXIT_STATUS -eq 0 ]]; then
if [[ -n $TRAVIS_TAG ]]; then
echo "Skipping Tests to Publish Release"
./gradlew pTML assemble --no-daemon || EXIT_STATUS=$?
else
./gradlew --stop
./gradlew testClasses --no-daemon || EXIT_STATUS=$?
./gradlew --stop
killall -9 java
./gradlew check --no-daemon -x licenseTest || EXIT_STATUS=$?
fi
fi
if [[ $EXIT_STATUS -eq 0 ]]; then
echo "Publishing archives for branch $TRAVIS_BRANCH"
if [[ -n $TRAVIS_TAG ]] || [[ $TRAVIS_BRANCH =~ ^master$ && $TRAVIS_PULL_REQUEST == 'false' ]]; then
echo "Publishing archives"
./gradlew --stop
if [[ -n $TRAVIS_TAG ]]; then
./gradlew bintrayUpload --no-daemon --stacktrace || EXIT_STATUS=$?
else
./gradlew publish --no-daemon --stacktrace || EXIT_STATUS=$?
fi
./gradlew --console=plain --no-daemon docs || EXIT_STATUS=$?
git clone https://${GH_TOKEN}@github.com/micronaut-projects/micronaut-docs.git -b gh-pages gh-pages --single-branch > /dev/null
cd gh-pages
# If this is the master branch then update the snapshot
if [[ $TRAVIS_BRANCH =~ ^master$ ]]; then
mkdir -p snapshot
cp -r ../build/docs/. ./snapshot/
git add snapshot/*
fi
# If there is a tag present then this becomes the latest
if [[ -n $TRAVIS_TAG ]]; then
# mkdir -p latest
# cp -r ../build/docs/. ./latest/
# git add latest/*
version="$TRAVIS_TAG"
version=${version:1}
majorVersion=${version:0:4}
majorVersion="${majorVersion}x"
mkdir -p "$version"
cp -r ../build/docs/. "./$version/"
git add "$version/*"
mkdir -p "$majorVersion"
cp -r ../build/docs/. "./$majorVersion/"
git add "$majorVersion/*"
fi
git commit -a -m "Updating docs for Travis build: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID" && {
git push origin HEAD || true
}
cd ..
rm -rf gh-pages
if [[ -n $TRAVIS_TAG ]]; then
echo "set released version in static website"
git clone https://${GH_TOKEN}@github.com/micronaut-projects/static-website.git -b master static-website-master --single-branch > /dev/null
cd static-website-master
version="$TRAVIS_TAG"
version=${version:1}
./release.sh $version
git commit -a -m "Updating micronaut version at static website for Travis build: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID" && {
git push origin HEAD || true
}
cd ..
rm -rf static-website-master
fi
fi
fi
exit $EXIT_STATUS
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。