Skip to content

Commit

Permalink
Made more compatible with different systems + plus guard clause earli…
Browse files Browse the repository at this point in the history
…er and more descriptive
  • Loading branch information
RoanPaulus committed Sep 25, 2024
1 parent 84a7c40 commit ab3d6c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/release.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

if [ $# -eq 0 ]; then
echo "Missing flag. Use --minor, --major or --patch"
exit 1
fi

BRANCH="production-release"

git fetch origin && \
Expand All @@ -13,25 +18,20 @@ echo "Fetched origin, created release-branch."
NEW_TAG_D="-1"
NEW_TAG=$NEW_TAG_D

if [ $# -eq 0 ]; then
echo "No arguments provided"
exit 1
fi

for cmd in "$@"
do
case $cmd in
"--major")
echo "Incrementing Major Version"
NEW_TAG=$(sh ./semver.sh -v major)
NEW_TAG=$(./semver.sh -v major)
;;
"--minor")
echo "Incrementing Minor Version"
NEW_TAG=$(sh ./semver.sh -v minor)
NEW_TAG=$(./semver.sh -v minor)
;;
"--patch")
echo "Incrementing Patch Version"
NEW_TAG=$(sh ./semver.sh -v patch)
NEW_TAG=$(./semver.sh -v patch)
;;
*)
echo "No version specified"
Expand All @@ -56,4 +56,4 @@ git push origin --follow-tags "$RELEASE_BRANCH" && \

echo "Don't forget to merge to main and Approve the deploy to the production environment!"

exit 0
exit 0
Empty file modified scripts/semver.sh
100644 → 100755
Empty file.

0 comments on commit ab3d6c8

Please sign in to comment.