Files
artcraft/scripts/publish_production.sh
T
Brandon Thomas fd8452aa5a Make sure gatsby doesn't harm the website dependencies
There will be additional work required to change the build scripts and
invoke Gatsby builds, but this will keep the two hermetically disjoint
and perhaps allow us to introduce the engine and library code in the
near future.
2024-07-29 08:53:13 -04:00

23 lines
491 B
Bash
Executable File

#!/bin/bash
set -euxo pipefail
MASTER_BRANCH='master'
PRODUCTION_BRANCH='production-fakeyou'
git stash
git branch --set-upstream-to="origin/${MASTER_BRANCH}" ${MASTER_BRANCH}
git checkout $MASTER_BRANCH
git pull
if git show-ref --verify --quiet "refs/heads/$PRODUCTION_BRANCH"; then
echo "Deleting branch ${PRODUCTION_BRANCH}"
git branch -D $PRODUCTION_BRANCH
fi
git checkout -b $PRODUCTION_BRANCH
git push --set-upstream origin $PRODUCTION_BRANCH
git checkout $MASTER_BRANCH