File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,35 @@ jobs:
8686 run : |
8787 set -o errexit -o nounset -o pipefail
8888
89+ echo '::group::Tags'
90+ {
91+ git fetch --tags --prune-tags || true
92+ echo "HEAD: $(git rev-parse --short HEAD)"
93+ echo "Ref: ${GITHUB_REF:-unknown}"
94+ git describe --tags --abbrev=0 2>/dev/null || echo '(no tags)'
95+ }
96+ echo '::endgroup::'
97+
8998 echo '::group::GitVersion (/output json)'
99+ output='' rc=0
100+ if ! output="$(dotnet gitversion /output json 2>&1)"; then
101+ rc=$?
102+ echo "::error title=GitVersion failed::${output}"
103+ {
104+ echo 'json<<EOF'
105+ echo '{}'
106+ echo 'EOF'
107+ } >> "$GITHUB_OUTPUT"
108+ echo '::endgroup::'
109+ exit "$rc"
110+ fi
111+
90112 {
91113 echo 'json<<EOF'
92- dotnet gitversion / output json
114+ printf '%s\n' "$ output"
93115 echo 'EOF'
94116 } >> "$GITHUB_OUTPUT"
117+
95118 echo '::notice title=GitVersion::JSON version info captured'
96119 echo '::endgroup::'
97120 # ######################################################
You can’t perform that action at this time.
0 commit comments