Skip to content

Commit

Permalink
fix CI...
Browse files Browse the repository at this point in the history
  • Loading branch information
astinz committed Oct 5, 2023
1 parent 21b0f59 commit 219a663
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ publishing {
repositories {
maven {
name = "sonatype"
setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val isSnapshot = version.toString().endsWith("-SNAPSHOT")
setUrl(
if (isSnapshot) {
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
} else {
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
},
)
credentials {
username = property("sonatypeUser") as String
password = property("sonatypePass") as String
Expand Down
3 changes: 3 additions & 0 deletions scripts/publish
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ if [[ ${git_head_commit} == "${git_last_merge_commit}" ]]; then
approve "Release commit found in branch at ${commit}, publishing..."
# Checkout release commit and build exactly that...
safe git checkout "${commit}"
# Ensure we have perms
safe chmod +x ./gradlew
safe ./gradlew :bcs:publish
safe git checkout "${git_head_commit}"
exit 0
fi
done
elif is_release_commit "${git_head_commit}"; then
approve "Release commit found at HEAD (${git_head_commit}), publishing..."
safe chmod +x ./gradlew
safe ./gradlew :bcs:publish
exit 0
fi
Expand Down

0 comments on commit 219a663

Please sign in to comment.