Skip to content

Commit 8f15232

Browse files
Add error handling to release script to stop on failure
Signed-off-by: Ndacyayisenga-droid <[email protected]>
1 parent e265913 commit 8f15232

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -e # Exit the script if any command fails
23

34
if [ -z "$1" ]; then
45
echo "Please provide version that should be released and the next snapshot version. Example: ./release.sh 0.1.0 0.2.0-SNAPSHOT"
@@ -38,4 +39,4 @@ git push
3839
echo "Setting version to $NEXT_VERSION"
3940
./mvnw versions:set -DnewVersion=$NEXT_VERSION
4041
git commit -am "Version $NEXT_VERSION"
41-
git push
42+
git push

0 commit comments

Comments
 (0)