Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali authored Sep 25, 2024
1 parent 591b0c0 commit e6ba94f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@

set -euo pipefail

current_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")

if [[ -z "$current_tag" ]]; then
echo "No tags found. Please make sure tags are available."
exit 1
fi
current_tag=$(git describe --tags --abbrev=0)

# Increment the patch version
LATEST_TAG=$(echo "$current_tag" | sed 's/^v//' | awk -F. '{print $1"."$2"."$3+1}') || exit $?
Expand Down Expand Up @@ -52,4 +47,4 @@ if [[ -n "$(git status --porcelain -- '**/README.md')" ]]; then
exit 1
else
echo "No version mismatch detected. All versions are up to date."
fi
fi

0 comments on commit e6ba94f

Please sign in to comment.