Skip to content

Commit f1c578e

Browse files
Magesh Chandramouliashishagg
authored andcommitted
Build fix (#88)
* fixing build / release process * fixing git branch for travis ci
1 parent bae9947 commit f1c578e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.travis/deploy.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ USERNAME=${SONATYPE_USERNAME}
77
PASSWORD=${SONATYPE_PASSWORD}
88
SHA=${TRAVIS_COMMIT}
99

10+
#!/usr/bin/env bash
11+
function fix_git {
12+
echo "Fixing git setup for ${BRANCH}"
13+
git checkout ${BRANCH}
14+
git branch -u origin/${BRANCH}
15+
git config branch.${BRANCH}.remote origin
16+
git config branch.${BRANCH}.merge refs/heads/${BRANCH}
17+
}
18+
1019
# Only if this is a master branch and it is not a PR - meaning, this commit
1120
# is from master branch most merge
1221
if [[ "${BRANCH}" == 'master' && "${PULL_REQUEST}" == 'false' ]]; then
@@ -22,6 +31,7 @@ if [[ "${BRANCH}" == 'master' && "${PULL_REQUEST}" == 'false' ]]; then
2231

2332
if [[ ! -z "${TAG_NAME}" && ${TAG_NAME} =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
2433
echo "travis tag is set -> updating pom.xml <version> attribute to ${TAG_NAME}"
34+
fix_git
2535
./mvnw --batch-mode --settings .travis/settings.xml -DskipTests=true -DreleaseVersion=${TAG_NAME} release:clean release:prepare release:perform
2636
SUCCESS=$?
2737
else

0 commit comments

Comments
 (0)