-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: run publish workflow from set branch
- Loading branch information
Showing
2 changed files
with
4 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o verbose | ||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
set -o errexit | ||
|
||
if [ "$BRANCH" != "master" ]; then | ||
echo "Refusing to release from $BRANCH. This script should be running in master." | ||
exit 1 | ||
fi | ||
git checkout master | ||
|
||
echo Fast-forwarding master to develop | ||
set -o errexit | ||
git fetch --quiet | ||
git reset --hard origin/master | ||
echo "Fast-forwarding master to develop" | ||
git merge --ff-only --quiet origin/develop | ||
set +o errexit | ||
|
||
echo Pushing master | ||
echo "Pushing master" | ||
git push origin master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters