File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,7 @@ function run {
40
40
# TODO Saucelabs settings need more tweaking before it becomes stable (sometimes it fails to connect)
41
41
# grunt karma:sauce --reporters=dots
42
42
43
- # NOTE(ajoslin): this is the only way I have found to reliably detect if we are on master.
44
- # `git rev-parse HEAD` changes to the name of a tag if we are pushing with a tag, as does TRAVIS_BRANCH.
45
- # `git branch` gives us back line-seperated list of all the branches, with a * beside
46
- # the active branch. So we grep the * then take out the spaces/asterisks and we have
47
- # branch name.
48
- GIT_BRANCH=$( git branch | grep ' * ' | sed ' s/ //g' | sed ' s/\*//g' )
43
+ GIT_BRANCH=$( git symbolic-ref HEAD --short)
49
44
if [[ " $GIT_BRANCH " != " master" ]]; then
50
45
echo " -- We are not on branch master, we are on branch $GIT_BRANCH . Will not push build out."
51
46
exit 0
You can’t perform that action at this time.
0 commit comments