Skip to content

Commit e1e4778

Browse files
committed
provides build number for PRs
Signed-off-by: Oleh Dokuka <[email protected]>
1 parent 5d383fa commit e1e4778

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ci/travis.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
77

88
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bintrayUser" != "" ] ; then
99

10-
echo -e "Building Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH"
10+
echo -e "Building Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER"
1111
./gradlew \
1212
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
1313
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
1414
-PversionSuffix="-SNAPSHOT" \
15+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
1516
build artifactoryPublish --stacktrace
1617

1718
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$bintrayUser" != "" ] ; then

gradle/artifactory.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
3333
defaults {
3434
publications(publishing.publications.maven)
3535
}
36+
37+
if (project.hasProperty('buildNumber')) {
38+
clientConfig.info.setBuildNumber(project.property('buildNumber').toString())
39+
}
3640
}
3741
}
3842
tasks.named("artifactoryPublish").configure {

0 commit comments

Comments
 (0)