Move target branch to a variable
This commit is contained in:
parent
529fb01894
commit
211f8b65e4
|
@ -5,9 +5,8 @@ set -uex
|
||||||
SITE_ENV="prod"
|
SITE_ENV="prod"
|
||||||
REPO=`git config remote.origin.url`
|
REPO=`git config remote.origin.url`
|
||||||
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
||||||
echo $SSH_REPO
|
|
||||||
SHA=`git rev-parse --verify HEAD`
|
SHA=`git rev-parse --verify HEAD`
|
||||||
echo $SHA
|
TARGET_BRANCH="master"
|
||||||
|
|
||||||
# Build front-end assets.
|
# Build front-end assets.
|
||||||
npm run prod
|
npm run prod
|
||||||
|
@ -22,4 +21,4 @@ mv output_${SITE_ENV} docs
|
||||||
# Add, commit and push the changes.
|
# Add, commit and push the changes.
|
||||||
git add --all docs
|
git add --all docs
|
||||||
git commit -m "Re-generate site. $SHA"
|
git commit -m "Re-generate site. $SHA"
|
||||||
git push $SSH_REPO master
|
git push $SSH_REPO $TARGET_BRANCH
|
||||||
|
|
Reference in a new issue