Skip to content

Commit fcaa267

Browse files
committed
Sanitize git log output used in for Go release template
The Go release system uses a `git log` command to determine the commit in order to populate the output of the application's `version` command. The expected output of the command is solely the short hash. With the previous command, that expectation was not realized under the following conditions: - The `log.showSignature` Git configuration option is set to true. - The commit being built was signed (as is always the case when a commit is made via the GitHub web interface). In this case, the signing information is shown in addition to the hash, breaking the build system.
1 parent 3a56fe8 commit fcaa267

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workflow-templates/assets/release-go-task/Taskfile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ vars:
1010
DIST_DIR: "dist"
1111
# build vars
1212
COMMIT:
13-
sh: echo "$(git log -n 1 --format=%h)"
13+
sh: echo "$(git log --no-show-signature -n 1 --format=%h)"
1414
TIMESTAMP:
1515
sh: echo "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
1616
TIMESTAMP_SHORT:

0 commit comments

Comments
 (0)