Skip to content

Commit 118a85b

Browse files
committed
Snapshot and documentation deployment
1 parent 4586e01 commit 118a85b

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ before_deploy: openssl aes-256-cbc -K $encrypted_a8202a3d8441_key -iv $encrypted
2020
deploy:
2121
- provider: script
2222
skip_cleanup: true
23-
script: bash deploy.sh
23+
script: "./gradlew publishToNexus uploadDocumentation closeAndReleaseRepository -s -Psigning.keyId=$SIGNING_KEY_ID -Psigning.password=$SIGNING_PASSWORD -Psigning.secretKeyRingFile=$TRAVIS_BUILD_DIR/secring.gpg"
2424
on:
2525
jdk: openjdk11
26-
tags: true
26+
tags: true
27+
- provider: script
28+
skip_cleanup: true
29+
script: "./gradlew publishToNexus uploadDocumentation -s -Psigning.keyId=$SIGNING_KEY_ID -Psigning.password=$SIGNING_PASSWORD -Psigning.secretKeyRingFile=$TRAVIS_BUILD_DIR/secring.gpg"
30+
on:
31+
jdk: openjdk11
32+
tags: false

build.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ allprojects {
4747
signing {
4848
required { !version.endsWith('SNAPSHOT') && gradle.taskGraph.hasTask("publish") }
4949
}
50-
50+
5151
publishing {
5252
publications.withType(MavenPublication) {
5353
pom {
@@ -123,3 +123,15 @@ nexusStaging {
123123
password = findProperty('ossrhPass')
124124
}
125125

126+
task uploadDocumentation(type: DefaultTask) {
127+
dependsOn "aggregateJavadocJar"
128+
doLast {
129+
project.exec {
130+
executable "curl"
131+
args "--http1.1"
132+
args "--user", "user:${findProperty('freefairDocsPass')}"
133+
args "--upload-file", aggregateJavadocJar.archiveFile.get().asFile
134+
args "https://docs.freefair.io/api/$project.version?path=okhttp-spring-boot"
135+
}
136+
}
137+
}

0 commit comments

Comments
 (0)