Add build datetime to version command output #1089
Merged
Conversation
ef316bc
to
bbcbafa
For the sake of completeness, you could do the same in Taskfile.yml. Something like: TIMESTAMP:
sh: echo "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
LDFLAGS: >
-ldflags '-X github.com/arduino/arduino-cli/version.commit={{.COMMIT}}
-X github.com/arduino/arduino-cli/version.date={{.TIMESTAMP}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
Enhanced an existing command.
version
command doesn't print datetime of the build in use.version
command prints datetime of the build in use if set.ldflags
are used to set build datetime with-X github.com/arduino/arduino-cli/version.date
.No.
None.
See how to contribute