Add scripts to publish to production

Eventually a central deploy system that doesn't push from developer
machines should be the standard mechanism. This will work for now.
This commit is contained in:
Brandon Thomas
2022-09-04 00:44:43 -04:00
parent bb372a3999
commit 784b576024
2 changed files with 42 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
set -euxo pipefail
MASTER_BRANCH='master'
PRODUCTION_BRANCH='production-fakeyou'
git stash
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
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
set -euxo pipefail
MASTER_BRANCH='master'
PRODUCTION_BRANCH='production-storyteller'
git stash
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