File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ runs:
3030
3131 # Compare versions and calculate the new version
3232 if [[ "$current_major" -eq "$target_major" && "$current_minor" -eq "$target_minor" ]]; then
33- new_patch=$((current_patch + 1))
34- new_version="$current_major.$current_minor.$new_patch"
33+ new_patch=$((current_patch + 1))
34+ new_version="$current_major.$current_minor.$new_patch"
3535 elif [[ "$current_major" -lt "$target_major" || ("$current_major" -eq "$target_major" && "$current_minor" -lt "$target_minor") ]]; then
36- new_version="$target_major.$target_minor.0"
36+ new_version="$target_major.$target_minor.0"
3737 else
38- echo "Error: Current major.minor is greater than the version in the VERSION file." >&2
39- exit 1
38+ echo "Error: Current major.minor is greater than the version in the VERSION file." >&2
39+ exit 1
4040 fi
4141
4242 # handle GitHub Actions context
@@ -48,11 +48,11 @@ runs:
4848 short_hash=$(printf "%08d" $((16#${sha:0:6})))
4949
5050 if [[ "$ref" == *"main"* ]]; then
51- # Main branch: keep the version as is
52- echo "$new_version"
51+ # Main branch: keep the version as is
52+ echo "$new_version"
5353 else
54- # Feature branch: append alpha versioning
55- echo "${new_version}a1${build_number}${short_hash}"
54+ # Feature branch: append alpha versioning
55+ echo "${new_version}a1${build_number}${short_hash}"
5656 fi
5757 }
5858
You can’t perform that action at this time.
0 commit comments