Skip to content

Commit

Permalink
ci(snapshots): set Central snapshots repository for libcryostat depen…
Browse files Browse the repository at this point in the history
…dency only when publishing a snapshot
  • Loading branch information
andrewazores committed Sep 11, 2024
1 parent 38f1ebe commit c0e5e81
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
34 changes: 17 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@
<url>https://github.com/cryostatio/cryostat-agent/tree/main</url>
</scm>

<repositories>
<repository>
<id>s01.oss.sonatype.org-snapshot</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>

<properties>
<mainClass>io.cryostat.agent.Agent</mainClass>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -589,9 +575,6 @@
<closeRepository>true</closeRepository>
<releaseRepository>true</releaseRepository>
<stagingRepositories>target/staging-deploy</stagingRepositories>
<!-- TODO this is needed so that the <repositories> block at the top is accepted,
which we need because of our dependency on -SNAPSHOT versions of libcryostat -->
<verifyPom>false</verifyPom>
</maven-central>
</nexus2>
</maven>
Expand All @@ -603,6 +586,23 @@
</build>
</profile>

<profile>
<id>snapshots</id>
<repositories>
<repository>
<id>s01.oss.sonatype.org-snapshot</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>

<profile>
<id>publication</id>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions release-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set -euo pipefail
IFS=$'\n\t'

echo "📦 Staging artifacts..."
./mvnw --batch-mode --no-transfer-progress -Ppublication -DskipTests=true -Dskip.spotless=true
./mvnw --batch-mode --no-transfer-progress -Ppublication,snapshots -DskipTests=true -Dskip.spotless=true

echo "🚀 Releasing..."
./mvnw --batch-mode --no-transfer-progress -Prelease jreleaser:deploy
./mvnw --batch-mode --no-transfer-progress -Prelease,snapshots jreleaser:deploy

echo "🎉 Done!"

0 comments on commit c0e5e81

Please sign in to comment.