@@ -12,10 +12,10 @@ set -e
1212# Parse command line arguments using zz_args helper
1313eval $(
1414 zz_args " Bump version files utility" $0 " $@ " << - help
15- - version version Version to set in files (optional - will use GitVersion if not provided)
1615 m minimal minimal Only bump workspace files if commit scope relates to workspace name
1716 r range range Git range to check for affected workspaces (required for minimal mode)
1817 d - dry_run Show what would be updated without making changes
18+ - version version Version to set in files (optional - will use GitVersion if not provided)
1919help
2020)
2121
@@ -24,23 +24,6 @@ cd "$(git rev-parse --show-toplevel)" > /dev/null
2424
2525# ===== VERSION DETERMINATION FUNCTIONS =====
2626
27- # Use GitVersion to determine the current semantic version
28- # Returns the semantic version based on git history and conventional commits
29- get_gitversion () {
30- local gitversion_output
31- if command -v dotnet-gitversion > /dev/null 2>&1 ; then
32- gitversion_output=$( dotnet-gitversion -config .gitversion 2> /dev/null)
33- if [ $? -eq 0 ]; then
34- echo " $gitversion_output " | jq -r ' .SemVer'
35- return 0
36- fi
37- fi
38-
39- # Fallback to basic version extraction if GitVersion fails
40- zz_log w " GitVersion not available or failed, falling back to tag-based versioning"
41- get_latest_tag | sed ' s/^v//' || echo " 0.1.0"
42- }
43-
4427# Get the latest semantic version tag from git history (fallback method)
4528get_latest_tag () {
4629 git tag -l --sort=-version:refname | grep -E ' ^v?[0-9]+\.[0-9]+\.[0-9]+' | head -1
@@ -251,7 +234,7 @@ bump_version_files() {
251234
252235# Determine version using GitVersion or user input
253236if [ -z " $version " ]; then
254- version=$( get_gitversion )
237+ version=$( gv -showvariable SemVer )
255238 zz_log s " GitVersion determined version: $version "
256239else
257240 version=$( format_version " $version " )
0 commit comments