File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -22,9 +22,5 @@ if test "$GIT_COMMAND" = "rebase"; then
22
22
exit 0
23
23
fi
24
24
25
- # Update VERSION file with current GitVersion semver
26
- if [ -f " ./update-version.sh" ]; then
27
- ./update-version.sh || zz_log w " Failed to update VERSION file"
28
- else
29
- zz_log w " update-version.sh script not found, skipping VERSION file update"
30
- fi
25
+ # Update VERSION file with current GitVersion semver using update-version script in the git hooks directory
26
+ git hook run update-version || zz_log w " Failed to update VERSION file"
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ update_version_file() {
12
12
local version=" $1 "
13
13
if [ -n " $version " ]; then
14
14
echo " $version " > " $VERSION_FILE "
15
- echo " Updated VERSION file to: $version "
15
+ zz_log s " Updated VERSION file to: $version "
16
16
else
17
- echo " Warning: Could not determine version"
17
+ zz_log w " Could not determine version"
18
18
fi
19
19
}
20
20
@@ -34,7 +34,7 @@ if command -v dotnet-gitversion >/dev/null 2>&1; then
34
34
# Try to get MajorMinorPatch from GitVersion
35
35
GITVERSION_OUTPUT=$( dotnet-gitversion -config .gitversion -showvariable MajorMinorPatch 2> /dev/null || echo " " )
36
36
# Check if output is a valid version number (only digits and dots) and not default
37
- if [ -n " $GITVERSION_OUTPUT " ] && echo " $GITVERSION_OUTPUT " | grep -qE ' ^[0-9]+\.[0-9]+\.[0-9]+$' && [ " $GITVERSION_OUTPUT " != " 1.0.0 " ] ; then
37
+ if [ -n " $GITVERSION_OUTPUT " ] && echo " $GITVERSION_OUTPUT " | grep -qE ' ^[0-9]+\.[0-9]+\.[0-9]+$' ; then
38
38
update_version_file " $GITVERSION_OUTPUT "
39
39
exit 0
40
40
fi
50
50
51
51
# Final fallback - keep existing version or use default
52
52
if [ -f " $VERSION_FILE " ]; then
53
- echo " Warning: Could not determine new version, keeping existing VERSION file"
53
+ zz_log w " Could not determine new version, keeping existing VERSION file"
54
54
else
55
55
update_version_file " 1.0.0"
56
56
fi
You can’t perform that action at this time.
0 commit comments