Skip to content

Commit

Permalink
Clean up website/publish.sh script
Browse files Browse the repository at this point in the history
Reduce noise by replacing the repeated `&&` chain with use of `set -e`,
which will cause the script to bail on the first command that exits with
a non-zero exit code.
  • Loading branch information
wincent committed Aug 9, 2014
1 parent 5bb67ab commit 6f09fbf
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions website/publish.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
#!/bin/bash

set -e

# Start in website/ even if run from root directory
cd "$(dirname "$0")"

cd ../../flux-gh-pages && \
git checkout -- . && \
git clean -dfx && \
git fetch && \
git rebase && \
rm -Rf * && \
cd ../flux/website && \
node server/generate.js && \
cp -R build/flux/* ../../flux-gh-pages/ && \
rm -Rf build/ && \
cd ../../flux-gh-pages && \
git add --all && \
git commit -m "update website" && \
git push && \
cd ../../flux-gh-pages
git checkout -- .
git clean -dfx
git fetch
git rebase
rm -Rf *
cd ../flux/website
node server/generate.js
cp -R build/flux/* ../../flux-gh-pages/
rm -Rf build/
cd ../../flux-gh-pages
git add --all
git commit -m "update website"
git push
cd ../flux/website

0 comments on commit 6f09fbf

Please sign in to comment.