mirror of
https://github.com/status-im/status-go.git
synced 2025-01-18 02:31:47 +00:00
fix(tag_version)_: properly calculate version tag (#5834)
This commit is contained in:
parent
51c1193ed2
commit
f859b58c38
@ -14,18 +14,20 @@ get_latest_tag() {
|
||||
bump_version() {
|
||||
local tag=$1
|
||||
local is_breaking_change=$2
|
||||
IFS='.' read -r major minor patch <<< "$tag"
|
||||
IFS='v.' read -r _ major minor patch <<< "$tag"
|
||||
|
||||
# Bump the version based on the type of change
|
||||
if [[ "$is_breaking_change" = true ]]; then
|
||||
((major++))
|
||||
((minor=0))
|
||||
((patch=0))
|
||||
else
|
||||
((minor++))
|
||||
((patch=0))
|
||||
fi
|
||||
|
||||
new_version="$major.$minor.$patch"
|
||||
echo "$new_version"
|
||||
echo "v$new_version"
|
||||
}
|
||||
|
||||
calculate_new_version() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user