-
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.
Merge pull request #14 from BenLorantfy/add-prepublish-script
Bump version and add pre-publish checks
- Loading branch information
Showing
2 changed files
with
13 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# Check to make sure we are on the master branch | ||
# See: https://stackoverflow.com/a/34658774/3006989 | ||
current_branch=$(git branch | grep '*'); | ||
|
||
if [ "$current_branch" != "* (HEAD detached at origin/master)" -a "$current_branch" != "* master" ]; then | ||
echo "Not on master - cannot proceed, please change to master by using:\n\n git checkout master\n" | ||
exit 1 | ||
fi |