Skip to content

Commit fa269a4

Browse files
committed
fixes build number
Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
1 parent 5864dfc commit fa269a4

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

artifactory.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
1919
subprojects {
2020
plugins.withId('com.jfrog.artifactory') {
2121
artifactory {
22+
contextUrl = 'https://oss.jfrog.org'
2223
publish {
2324
contextUrl = 'https://oss.jfrog.org'
2425

@@ -33,9 +34,6 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
3334
defaults {
3435
publications('maven')
3536
}
36-
if (project.hasProperty('buildNumber')) {
37-
clientConfig.info.setBuildNumber('' + project.property('buildNumber'))
38-
}
3937
}
4038
}
4139
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'com.google.osdetector' version '1.4.0'
33
id 'com.github.sherter.google-java-format' version '0.8' apply false
44
id 'com.github.johnrengelman.shadow' version '5.2.0' apply false
5-
id 'com.jfrog.artifactory' version '4.11.0' apply false
5+
id 'com.jfrog.artifactory' version '4.12.0' apply false
66
id 'com.jfrog.bintray' version '1.8.4' apply false
77
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
88
id 'io.morethan.jmhreport' version '0.9.0' apply false

ci/travis.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,32 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bin
1717
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
1818
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
1919
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
20-
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
20+
-PbuildInfo.build.number="$TRAVIS_BUILD_NUMBER" \
21+
-PbuildInfo.build.timestamp="$(git show -s --format=%ct HEAD)000" \
2122
build artifactoryPublish --stacktrace
2223

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

25-
echo -e "Building Branch Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER"
26+
echo -e "Building Branch Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER/$TRAVIS_BUILD_NUMBER"
2627
./gradlew \
2728
-PversionSuffix="-${TRAVIS_BRANCH//\//-}-SNAPSHOT" \
2829
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
2930
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
3031
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
31-
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
32+
-PbuildInfo.build.number="$TRAVIS_BUILD_NUMBER" \
33+
-PbuildInfo.build.timestamp="$(git show -s --format=%ct HEAD)000" \
3234
build artifactoryPublish --stacktrace
3335

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

3638
echo -e "Building Tag $TRAVIS_REPO_SLUG/$TRAVIS_TAG"
3739
./gradlew \
38-
-Pversion="$TRAVIS_TAG" -Pstage="$TRAVIS_BUILD_STAGE_NAME" -PbuildNumber="$TRAVIS_BUILD_NUMBER" \
40+
-Pversion="$TRAVIS_TAG" -Pstage="$TRAVIS_BUILD_STAGE_NAME" \
3941
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
4042
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
4143
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
42-
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
44+
-PbuildInfo.build.number="$TRAVIS_BUILD_NUMBER" \
45+
-PbuildInfo.build.timestamp="$(git show -s --format=%ct HEAD)000" \
4346
build bintrayUpload --stacktrace
4447

4548
else

0 commit comments

Comments
 (0)