mirror of
https://github.com/status-im/status-go.git
synced 2025-02-06 11:56:01 +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() {
|
bump_version() {
|
||||||
local tag=$1
|
local tag=$1
|
||||||
local is_breaking_change=$2
|
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
|
# Bump the version based on the type of change
|
||||||
if [[ "$is_breaking_change" = true ]]; then
|
if [[ "$is_breaking_change" = true ]]; then
|
||||||
((major++))
|
((major++))
|
||||||
((minor=0))
|
((minor=0))
|
||||||
|
((patch=0))
|
||||||
else
|
else
|
||||||
((minor++))
|
((minor++))
|
||||||
|
((patch=0))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_version="$major.$minor.$patch"
|
new_version="$major.$minor.$patch"
|
||||||
echo "$new_version"
|
echo "v$new_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
calculate_new_version() {
|
calculate_new_version() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user