Skip to content

Commit 404bcd7

Browse files
committed
ci: add release script
Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
1 parent 4d48778 commit 404bcd7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

scripts/release.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
VERSION="$1"
6+
NEXT_VERSION="$2"
7+
8+
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="$VERSION"
9+
git commit \
10+
--include "pom.xml" \
11+
--include "**/pom.xml" \
12+
--signoff \
13+
--message "Release version ${VERSION}"
14+
git tag \
15+
--annotate "v${VERSION}" \
16+
--message "Release version ${VERSION}"
17+
18+
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="${NEXT_VERSION}-SNAPSHOT"
19+
git commit \
20+
--include "pom.xml" \
21+
--include "**/pom.xml" \
22+
--signoff \
23+
--message "Next development version"
24+
25+
echo "Please inspect your commits before moving forward."
26+
echo
27+
read -p "Are you sure you want to continue? [yN]" -n 1 -r
28+
echo # (optional) move to a new line
29+
if [[ $REPLY =~ ^[Yy]$ ]]
30+
then
31+
git push
32+
git push --tags
33+
fi

0 commit comments

Comments
 (0)