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

38 lines
927 B
Bash
Raw Normal View History

2016-07-10 13:02:25 +02:00
if [ $CI == "true" ] && [ $CIRCLE_BRANCH == "master" ]; then
2016-08-08 16:26:33 +02:00
echo "Packaging daily build...";
cd dist;
zip $CIRCLE_ARTIFACTS/dist.zip * -r -9;
cd ..;
echo "Publishing online demo...";
2016-07-10 13:02:25 +02:00
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;
2016-08-08 16:26:33 +02:00
rm -f downloads/latest_daily_build.zip;
2016-07-10 13:02:25 +02:00
rm -f index.html;
2016-08-02 18:03:00 +02:00
rm -f index.manifest;
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-08 16:26:33 +02:00
mv $CIRCLE_ARTIFACTS/dist.zip ./downloads/latest_daily_build.zip;
mv $CIRCLE_ARTIFACTS/README.md ./;
mv $CIRCLE_ARTIFACTS/LICENSE ./;
2016-08-01 17:52:41 +02:00
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
2016-08-08 16:26:33 +02:00
echo "Done. ";
2016-08-02 18:03:00 +02:00
fi