Skip to content

Commit 2bf2359

Browse files
committed
chore(travis): correctly detect if branch is master
1 parent 383ebeb commit 2bf2359

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

scripts/bower/publish.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ function run {
5353
echo "-- Pushing bower-ionic"
5454
cd $BOWER_DIR
5555

56-
git push -q origin master
57-
git push -q origin v$VERSION
56+
git push -q --tags origin master
5857

5958
echo "-- Published bower-ionic to v$VERSION successfully!"
6059

scripts/release/finalize-version.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ function publish {
4343

4444
VERSION=$(readJsonProp "package.json" "version")
4545

46-
git push origin master
47-
git push origin v$VERSION
46+
git push --tags origin master
4847

4948
echo "-- Version published as v$VERSION successfully!"
5049

scripts/travis/ci.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,14 @@ function run {
4040
# TODO Saucelabs settings need more tweaking before it becomes stable (sometimes it fails to connect)
4141
# grunt karma:sauce --reporters=dots
4242

43-
GIT_IS_MASTER=$(git symbolic-ref HEAD | grep master || echo false)
44-
if [[ "$GIT_IS_MASTER" == "false" ]]; then
45-
echo "-- We are not on branch master. Will not push build out."
43+
if [[ "$TRAVIS_BRANCH" != "master" ]]; then
44+
echo "-- We are not on branch master, instead we are on branch $TRAVIS_BRANCH. Will not push build out."
4645
exit 0
4746
fi
4847
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
4948
echo "-- This is a pull request build; will not push build out."
5049
exit 0
5150
fi
52-
echo 'done'
53-
exit 0
5451

5552
# If latest commit message starts with 'chore(release):' it's a release
5653
COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT | head -c 15)

0 commit comments

Comments
 (0)