The Wayback Machine - https://web.archive.org/web/20210306015237/https://github.com/arduino/arduino-cli/pull/1089
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build datetime to version command output #1089

Merged
merged 1 commit into from Dec 2, 2020

Conversation

@silvanocerza
Copy link
Contributor

@silvanocerza silvanocerza commented Nov 30, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce?

Enhanced an existing command.

  • What is the current behavior?

version command doesn't print datetime of the build in use.

  • What is the new behavior?

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.

  • Does this PR introduce a breaking change?

No.

  • Other information:

None.


See how to contribute

@silvanocerza silvanocerza requested review from ubidefeo, per1234 and rsora Nov 30, 2020
@silvanocerza silvanocerza self-assigned this Nov 30, 2020
@silvanocerza silvanocerza force-pushed the scerza/version-datetime branch 2 times, most recently from ef316bc to bbcbafa Nov 30, 2020
Copy link
Contributor

@per1234 per1234 left a comment

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}}'
@silvanocerza silvanocerza force-pushed the scerza/version-datetime branch from bbcbafa to ecb74dd Dec 1, 2020
@silvanocerza silvanocerza force-pushed the scerza/version-datetime branch from ecb74dd to f96b6d3 Dec 1, 2020
@per1234
per1234 approved these changes Dec 1, 2020
@silvanocerza silvanocerza merged commit 9885078 into master Dec 2, 2020
14 checks passed
14 checks passed
verify-links
Details
verify-links
Details
verify-formatting
Details
verify-formatting
Details
test-matrix (ubuntu-latest)
Details
test-matrix (ubuntu-latest)
Details
test-matrix (windows-latest)
Details
test-matrix (windows-latest)
Details
test-matrix (macOS-latest)
Details
test-matrix (macOS-latest)
Details
create-test-artifacts
Details
create-test-artifacts
Details
codecov/project 37.74% (target 30.00%)
Details
license/cla Contributor License Agreement is signed.
Details
@silvanocerza silvanocerza deleted the scerza/version-datetime branch Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants