Skip to content

Commit 5fa3d4d

Browse files
author
Jeff Baker
authored
Merge pull request #86 from ExpediaDotCom/build-fix
trying to fix travis build issue
2 parents 8c05846 + c16ba59 commit 5fa3d4d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.travis/deploy.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
#!/bin/bash
22
cd `dirname $0`/..
33

4-
function fix_git {
5-
echo "Fixing git setup for $TRAVIS_BRANCH"
6-
git checkout ${TRAVIS_BRANCH}
7-
git branch -u origin/${TRAVIS_BRANCH}
8-
git config branch.${TRAVIS_BRANCH}.remote origin
9-
git config branch.${TRAVIS_BRANCH}.merge refs/heads/${TRAVIS_BRANCH}
10-
}
11-
12-
134
if [ "${TRAVIS_BRANCH}" == 'master' -a "${TRAVIS_PULL_REQUEST}" == 'false' ] || [ -n "${TRAVIS_TAG}" ]; then
145
if [[ -z "${SONATYPE_USERNAME}" || -z "${SONATYPE_PASSWORD}" ]]; then
156
echo "ERROR! Please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variable"
167
exit 1
178
fi
189

10+
TAG_NAME=`git describe ${TRAVIS_COMMIT} --tags`
11+
echo "Tag associated with the current commit ${TRAVIS_COMMIT} is ${TAG_NAME}"
12+
1913
if [ ! -z "${TRAVIS_TAG}" ]; then
20-
fix_git
2114
echo "travis tag is set -> updating pom.xml <version> attribute to ${TRAVIS_TAG}"
2215
./mvnw --batch-mode --settings .travis/settings.xml -DskipTests=true -DreleaseVersion=${TRAVIS_TAG} release:clean release:prepare release:perform
2316
SUCCESS=$?

0 commit comments

Comments
 (0)