Skip to content

Commit

Permalink
Updates to release tasks
Browse files Browse the repository at this point in the history
* Use Gradle 5.4.1 (fixes bug in `gitPublishPush`)
* Fix `githubRelease` to pickup artifacts downloaded in same execution
* Snapshot docs release without `snapshot/` folder prefix
  • Loading branch information
kdubb committed Sep 29, 2019
1 parent 1e2287f commit 575a871
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- ssh-add .travis/github_deploy_key
script:
# Workaround for ajoberstar/gradle-git-publish/issues/65, remove when resolved
- ./gradlew --stacktrace -PpostgresVersions=${PGVERSION} documentation:gitPublishPush || true
- ./gradlew --stacktrace -PpostgresVersions=${PGVERSION} documentation:gitPublishPush
- ./gradlew --stacktrace -PpostgresVersions=${PGVERSION} -PossrhUsername=$SONATYPE_USER -PossrhPassword=$SONATYPE_PASS publish

Expand Down
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ tasks {
)

val downloadArtifacts = register<Task>("downloadArtifacts") {
outputs.files(downloadTasks.flatMap { it.get().outputFiles })
dependsOn(downloadTasks)
}

Expand All @@ -77,7 +78,7 @@ tasks {
## [User Guide](https://impossibl.github.io/pgjdbc-ng/docs/$version/user-guide)
""".trimIndent().trim()
)
releaseAssets.from(file("$buildDir/artifacts/").listFiles())
releaseAssets.from(downloadArtifacts)
}

}
Expand All @@ -95,6 +96,7 @@ fun centralDownload(group: String, artifact: String, classifier: String? = null)
}

return tasks.register<Download>("downloadCentral" + "$group-$artifact-${classifier ?: ""}") {
outputFiles.add(file(dest))
src("$base?r=$repo&g=$group&a=$artifact$queryClassifier&v=$version")
dest(dest)
}
Expand Down
20 changes: 6 additions & 14 deletions documentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,13 @@ tasks {
branch.set("gh-pages")

contents {
if (isSnapshot) {
from("$buildDir/docs/html5") {
into("docs/snapshot/$version")
}
from ("$buildDir/javadoc") {
into("docs/snapshot/$version/javadoc")
}
from("$buildDir/docs/html5") {
into("docs/$version")
}
else {
from("$buildDir/docs/html5") {
into("docs/$version")
}
from ("$buildDir/javadoc") {
into("docs/$version/javadoc")
}
from ("$buildDir/javadoc") {
into("docs/$version/javadoc")
}
if (!isSnapshot) {
from("$buildDir/docs/html5") {
into("docs/current")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 comments on commit 575a871

Please sign in to comment.