Skip to content

Commit 3fc3645

Browse files
committed
Merge branch '2.19' into 2.20
2 parents 6e8b8ca + 7539ecc commit 3fc3645

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

init-release.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Exit on error
4+
set -e
5+
6+
# Check if pom.xml exists
7+
if [ ! -f "pom.xml" ]; then
8+
echo "Error: pom.xml not found in current directory"
9+
exit 1
10+
fi
11+
12+
# Remove -SNAPSHOT from parent pom reference only
13+
echo "Removing -SNAPSHOT from parent pom reference..."
14+
sed -i.bak '/<parent>/,/<\/parent>/s/<version>\([^<]*\)-SNAPSHOT<\/version>/<version>\1<\/version>/' pom.xml
15+
16+
# Check if changes were made
17+
if ! diff pom.xml pom.xml.bak > /dev/null 2>&1; then
18+
echo "Successfully removed -SNAPSHOT from pom.xml"
19+
rm pom.xml.bak
20+
else
21+
echo "No -SNAPSHOT found in pom.xml for parenet pom"
22+
rm pom.xml.bak
23+
fi
24+
25+
# Git add pom.xml
26+
echo "Adding pom.xml to git..."
27+
git add pom.xml
28+
29+
# Open emacs to edit release notes
30+
echo "Opening emacs to edit release notes..."
31+
emacs -nw release-notes/VERSION*
32+
echo "Adding release-notes/VERSION* to git..."
33+
git add release-notes/VERSION*
34+
35+
git diff --staged

0 commit comments

Comments
 (0)