bash/deploy.sh in jgd-1.6.5 vs bash/deploy.sh in jgd-1.7

- old
+ new

@@ -2,10 +2,11 @@ set -x set -e set -o pipefail URL=$1 +BRANCH=$2 SRC=$(pwd) TEMP=$(mktemp -d -t jgd-XXX) trap "rm -rf ${TEMP}" EXIT CLONE=${TEMP}/clone COPY=${TEMP}/copy @@ -35,23 +36,23 @@ cd ${TEMP} rm -rf ${CLONE} mv ${COPY} ${CLONE} cd ${CLONE} -echo -e "\nPreparing gh-pages branch:" -if [ -z "$(git branch -a | grep origin/gh-pages)" ]; then - git checkout --orphan gh-pages +echo -e "\nPreparing ${BRANCH} branch:" +if [ -z "$(git branch -a | grep origin/${BRANCH})" ]; then + git checkout --orphan "${BRANCH}" else - git checkout gh-pages + git checkout "${BRANCH}" fi -echo -e "\nDeploying into gh-pages branch:" +echo -e "\nDeploying into ${BRANCH} branch:" rm -rf * cp -R ${TEMP}/_site/* . rm -f README.md git add . git commit -am "new version $(date)" --allow-empty -git push origin gh-pages 2>&1 | sed 's|'$URL'|[skipped]|g' +git push origin ${BRANCH} 2>&1 | sed 's|'$URL'|[skipped]|g' echo -e "\nCleaning up:" rm -rf "${CLONE}" rm -rf "${SITE}"