Skip to content

Commit d405492

Browse files
committed
Add helper script for safekeeping
1 parent 67f7da4 commit d405492

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

init-release.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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
13+
echo "Removing -SNAPSHOT from parent pom reference..."
14+
sed -i.bak 's/<version>\([^<]*\)-SNAPSHOT<\/version>/<version>\1<\/version>/g' 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"
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*

0 commit comments

Comments
 (0)