modify daily build script
This commit is contained in:
parent
51ebed8d23
commit
b9477883e2
|
@ -1,36 +1,32 @@
|
|||
if [ $CI == "true" ] && [ $CIRCLE_BRANCH == "master" ]; then
|
||||
echo "Packaging daily build...";
|
||||
cd dist;
|
||||
zip $CIRCLE_ARTIFACTS/dist.zip * -r -9;
|
||||
cd ..;
|
||||
|
||||
echo "Publishing online demo...";
|
||||
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;
|
||||
|
||||
echo "Publishing daily build...";
|
||||
cp dist $CIRCLE_ARTIFACTS/ -r;
|
||||
cp LICENSE $CIRCLE_ARTIFACTS/;
|
||||
|
||||
git checkout -b daily-build remotes/origin/daily-build;
|
||||
|
||||
rm -rf css;
|
||||
rm -rf fonts;
|
||||
rm -rf js;
|
||||
rm -rf langs;
|
||||
rm -rf imgs;
|
||||
rm -f downloads/latest_daily_build.zip;
|
||||
rm -f index.html;
|
||||
rm -f index.manifest;
|
||||
rm -f README.md;
|
||||
rm -f LICENSE;
|
||||
|
||||
cp $CIRCLE_ARTIFACTS/dist/* ./ -r;
|
||||
mv $CIRCLE_ARTIFACTS/dist.zip ./downloads/latest_daily_build.zip;
|
||||
mv $CIRCLE_ARTIFACTS/README.md ./;
|
||||
mv $CIRCLE_ARTIFACTS/LICENSE ./;
|
||||
|
||||
git add -A;
|
||||
git commit -a -m "daily build #$CIRCLE_SHA1";
|
||||
git push origin daily-build;
|
||||
|
||||
echo "Publishing online demo...";
|
||||
git checkout -b gh-pages remotes/origin/gh-pages;
|
||||
git merge daily-build;
|
||||
git push origin gh-pages;
|
||||
|
||||
echo "Done.";
|
||||
|
|
Reference in a new issue