Skip to content

Commit b8331c2

Browse files
committed
ci: Add null checks for bintray upload
1 parent 6877aef commit b8331c2

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ before_install:
2727
sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
2828
echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
2929
fi
30-
- npm install -g [email protected]
31-
- nvm install 'lts/*'
32-
- sudo apt-get update
33-
- sudo apt-get install python
30+
#- npm install -g [email protected]
31+
#- nvm install 'lts/*'
32+
#- sudo apt-get update
33+
#- sudo apt-get install python
3434
install:
3535
- if [ "${TRAVIS_TAG}" = "${TRAVIS_BRANCH}" ]; then cd appscan; make asoc-tool; cd
3636
../; fi
37-
- npm install -g [email protected]
38-
- npm install @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github @semantic-release/exec -D
39-
- pip install --user bumpversion
37+
#- npm install -g [email protected]
38+
#- npm install @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github @semantic-release/exec -D
39+
#- pip install --user bumpversion
4040
before_script:
4141
- if [ "${TRAVIS_TAG}" = "${TRAVIS_BRANCH}" ]; then chmod a+x ./appscan/ASOC.sh; fi
4242
- env
@@ -47,7 +47,7 @@ script:
4747
&& tar xvf secrets.tar
4848
|| true'
4949
- if [ "${TRAVIS_TAG}" = "${TRAVIS_BRANCH}" ]; then ./appscan/ASOC.sh; fi
50-
- "./gradlew install -x check"
50+
#- "./gradlew install -x check"
5151
#- "./gradlew checkstyleMain"
5252
#- "./gradlew checkstyleTest"
5353
#- "./gradlew codeCoverageReport --continue"

.utility/bintray-properties.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ext {
2-
packageName = PACKAGE_NAME
3-
libraryName = NAME
4-
artifact = ARTIFACT_ID
5-
libraryDescription = DESCRIPTION
2+
packageName = project.hasProperty('PACKAGE_NAME') ? PACKAGE_NAME : null
3+
libraryName = project.hasProperty('NAME') ? NAME : null
4+
artifact = project.hasProperty('ARTIFACT_ID') ? ARTIFACT_ID : null
5+
libraryDescription = project.hasProperty('DESCRIPTION') ? DESCRIPTION : null
66
}
77

88
apply from: rootProject.file('.utility/bintray-release.gradle')

.utility/bintray-release.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ apply plugin: 'java-library'
55
apply plugin: 'maven'
66
apply plugin: 'maven-publish'
77

8+
bintrayUpload.onlyIf { packageName && artifact && libraryName && libraryDescription }
9+
810
bintrayUpload.dependsOn assemble
911
bintrayUpload.dependsOn sourcesJar
1012
bintrayUpload.dependsOn javadocJar
@@ -13,7 +15,7 @@ bintray {
1315
user = System.getenv('BINTRAY_USER')
1416
key = System.getenv('BINTRAY_APIKEY')
1517
publications = ['maven']
16-
dryRun = false
18+
dryRun = true
1719
pkg {
1820
repo = 'ibm-cloud-sdk-repo'
1921
name = packageName

0 commit comments

Comments
 (0)