File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -88,21 +88,26 @@ buildScan {
8888}
8989
9090def versionSuffix () {
91- def versionSuffix = ' '
91+ def versionSuffix
9292 def branchName = project. findProperty(' branch' );
9393 if (branchName == null ) {
9494 def details = versionDetails()
9595 if (details != null ) {
9696 branchName = details. branchName
9797 }
9898 }
99-
99+ /* branch */
100100 if (branchName != null ) {
101101 if (branchName == ' master' ) {
102+ versionSuffix = ' '
103+ } else if (branchName == ' develop' ) {
102104 versionSuffix = ' -SNAPSHOT'
103105 } else {
104106 versionSuffix = " -${ branchName.replace("/", "-")} -SNAPSHOT"
105107 }
108+ /* tag*/
109+ } else {
110+ versionSuffix = ' '
106111 }
107112 return versionSuffix
108113}
Original file line number Diff line number Diff line change @@ -5,12 +5,9 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
55 echo -e " Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH ]"
66 ./gradlew -Pbranch=" ${TRAVIS_BRANCH} " build
77elif [ " $TRAVIS_PULL_REQUEST " == " false" ] && [ " $TRAVIS_TAG " == " " ]; then
8- echo -e ' Build Branch with Snapshot => Branch [' $TRAVIS_BRANCH ' ]'
8+ echo -e ' Build Branch => Branch [' $TRAVIS_BRANCH ' ]'
99 ./gradlew -PbintrayUser=" ${bintrayUser} " -PbintrayKey=" ${bintrayKey} " -Pbranch=" ${TRAVIS_BRANCH} " build artifactoryPublish --stacktrace
10- elif [ " $TRAVIS_PULL_REQUEST " == " false" ] && [ " $TRAVIS_TAG " != " " ]; then
11- echo -e ' Build Branch for Release => Branch [' $TRAVIS_BRANCH ' ] Tag [' $TRAVIS_TAG ' ]'
12- ./gradlew -PbintrayUser=" ${bintrayUser} " -PbintrayKey=" ${bintrayKey} " build bintrayUpload --stacktrace
1310else
14- echo -e ' WARN: Should not be here => Branch [ ' $TRAVIS_BRANCH ' ] Tag [' $TRAVIS_TAG ' ] Pull Request [ ' $TRAVIS_PULL_REQUEST ' ]'
15- ./gradlew -Pbranch= " ${TRAVIS_BRANCH} " build
11+ echo -e ' Build Tag => Tag [' $TRAVIS_TAG ' ]'
12+ ./gradlew build
1613fi
You can’t perform that action at this time.
0 commit comments