mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-25 18:49:38 +00:00
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:
Executable
+21
@@ -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
|
||||
|
||||
Executable
+21
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user