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

29 lines
635 B
Bash
Raw Normal View History

2016-07-10 13:02:25 +02:00
if [ $CI == "true" ] && [ $CIRCLE_BRANCH == "master" ]; then
2017-02-09 18:36:15 +01:00
git config --global user.name "CircleCI";
git config --global user.email "CircleCI";
2016-08-08 16:26:33 +02:00
2017-02-09 18:36:15 +01:00
echo "Publishing daily build...";
2016-07-10 13:02:25 +02:00
cp dist $CIRCLE_ARTIFACTS/ -r;
2016-08-01 17:52:41 +02:00
cp LICENSE $CIRCLE_ARTIFACTS/;
2017-02-09 18:36:15 +01:00
git checkout -b daily-build remotes/origin/daily-build;
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 -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 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/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";
2017-02-09 18:36:15 +01:00
git push origin daily-build;
echo "Done.";
2016-08-02 18:03:00 +02:00
fi