This repository has been archived on 2022-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
AriaNg/scripts/publish_dailybuild.sh

32 lines
820 B
Bash
Raw Normal View History

2016-07-10 13:02:25 +02:00
if [ $CI == "true" ] && [ $CIRCLE_BRANCH == "master" ]; then
cp dist $CIRCLE_ARTIFACTS/ -r;
2016-08-01 17:52:41 +02:00
cp README.md $CIRCLE_ARTIFACTS/;
cp LICENSE $CIRCLE_ARTIFACTS/;
git config --global user.name "CircleCI";
git config --global user.email "CircleCI";
2016-07-10 13:02:25 +02:00
git checkout -b gh-pages remotes/origin/gh-pages;
2016-08-01 17:52:41 +02:00
2016-07-10 13:02:25 +02:00
rm -rf css;
rm -rf fonts;
rm -rf js;
rm -rf langs;
rm -rf imgs;
rm -rf views;
rm -f index.html;
2016-08-01 17:52:41 +02:00
rm -f README.md;
rm -f LICENSE;
2016-07-10 13:02:25 +02:00
cp $CIRCLE_ARTIFACTS/dist/* ./ -r;
2016-08-01 17:52:41 +02:00
cp $CIRCLE_ARTIFACTS/README.md ./
cp $CIRCLE_ARTIFACTS/LICENSE ./
2016-07-16 19:28:39 +02:00
git add -A;
2016-07-16 16:41:33 +02:00
git commit -a -m "daily build #$CIRCLE_SHA1";
2016-07-10 13:02:25 +02:00
git push origin gh-pages;
2016-08-01 17:52:41 +02:00
zip $CIRCLE_ARTIFACTS/dist.zip $CIRCLE_ARTIFACTS/dist/* -r;
rm -rf $CIRCLE_ARTIFACTS/dist;
rm -f $CIRCLE_ARTIFACTS/README.md;
rm -f $CIRCLE_ARTIFACTS/LICENSE;
2016-07-10 13:02:25 +02:00
fi