Skip to content

Commit 2a88110

Browse files
authored
Fix release (#1373)
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 68b332a commit 2a88110

File tree

5 files changed

+39
-25
lines changed

5 files changed

+39
-25
lines changed

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ run = "../../mvnw test -PnativeTest"
5959
dir = "integration-tests/it-spring-boot-smoke-test"
6060

6161
[tasks.set-version]
62-
run = 'mvn versions:set -DnewVersion={{arg(name="version")}}'
62+
run = './scripts/set-version.sh {{arg(name="version")}}'
6363

6464
[tasks.javadoc]
6565
run = [

pom.xml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,6 @@
169169
<artifactId>maven-javadoc-plugin</artifactId>
170170
<version>3.11.2</version>
171171
</plugin>
172-
<plugin>
173-
<artifactId>maven-gpg-plugin</artifactId>
174-
<version>3.2.7</version>
175-
</plugin>
176-
<plugin>
177-
<artifactId>maven-source-plugin</artifactId>
178-
<version>3.3.1</version>
179-
</plugin>
180172
<plugin>
181173
<artifactId>maven-enforcer-plugin</artifactId>
182174
<version>3.5.0</version>
@@ -418,5 +410,24 @@
418410
</plugins>
419411
</build>
420412
</profile>
413+
<profile>
414+
<id>release</id>
415+
<build>
416+
<plugins>
417+
<plugin>
418+
<groupId>org.apache.maven.plugins</groupId>
419+
<artifactId>maven-javadoc-plugin</artifactId>
420+
<executions>
421+
<execution>
422+
<id>attach-javadocs</id>
423+
<goals>
424+
<goal>jar</goal>
425+
</goals>
426+
</execution>
427+
</executions>
428+
</plugin>
429+
</plugins>
430+
</build>
431+
</profile>
421432
</profiles>
422433
</project>

prometheus-metrics-parent/pom.xml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,10 @@
9595
<id>release</id>
9696
<build>
9797
<plugins>
98-
<plugin>
99-
<groupId>org.apache.maven.plugins</groupId>
100-
<artifactId>maven-javadoc-plugin</artifactId>
101-
<executions>
102-
<execution>
103-
<id>attach-javadocs</id>
104-
<goals>
105-
<goal>jar</goal>
106-
</goals>
107-
<configuration>
108-
<skip>${javadoc.skip}</skip>
109-
</configuration>
110-
</execution>
111-
</executions>
112-
</plugin>
11398
<plugin>
11499
<groupId>org.apache.maven.plugins</groupId>
115100
<artifactId>maven-gpg-plugin</artifactId>
101+
<version>3.2.7</version>
116102
<executions>
117103
<execution>
118104
<id>sign-artifacts</id>
@@ -132,6 +118,7 @@
132118
<plugin>
133119
<groupId>org.apache.maven.plugins</groupId>
134120
<artifactId>maven-source-plugin</artifactId>
121+
<version>3.3.1</version>
135122
<executions>
136123
<execution>
137124
<id>attach-sources</id>

scripts/build-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -euo pipefail
44

55
VERSION=${TAG#v}
66

7-
mvn versions:set -DnewVersion="$VERSION"
7+
./scripts/set-version.sh "$VERSION"
88
mvn -B package -P 'release,!default' -Dmaven.test.skip=true

scripts/set-version.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
VERSION=$1
6+
7+
if [ -z "$VERSION" ]; then
8+
echo "Usage: $0 <version>"
9+
exit 1
10+
fi
11+
12+
# replace all occurrences '<version>1.4.0-SNAPSHOT</version>' with '<version>$VERSION</version>'
13+
# in all pom.xml files in the current directory and subdirectories
14+
15+
find . -name 'pom.xml' -exec \
16+
sed -i "s/<version>1.4.0-SNAPSHOT<\/version>/<version>$VERSION<\/version>/g" {} +

0 commit comments

Comments
 (0)