Skip to content

Commit

Permalink
update publish scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Aug 1, 2016
1 parent 0d3294d commit 4998953
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion scripts/publish_dailybuild.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
if [ $CI == "true" ] && [ $CIRCLE_BRANCH == "master" ]; then
cp dist $CIRCLE_ARTIFACTS/ -r;
cp README.md $CIRCLE_ARTIFACTS/;
cp LICENSE $CIRCLE_ARTIFACTS/;

git config --global user.name "CircleCI";
git config --global user.email "CircleCI";
git checkout -b gh-pages remotes/origin/gh-pages;

rm -rf css;
rm -rf fonts;
rm -rf js;
rm -rf langs;
rm -rf imgs;
rm -rf views;
rm -f index.html;
rm -f README.md;
rm -f LICENSE;

cp $CIRCLE_ARTIFACTS/dist/* ./ -r;
git config --global user.name "CircleCI";
cp $CIRCLE_ARTIFACTS/README.md ./
cp $CIRCLE_ARTIFACTS/LICENSE ./

git add -A;
git commit -a -m "daily build #$CIRCLE_SHA1";
git push origin gh-pages;

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;
fi

0 comments on commit 4998953

Please sign in to comment.