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

[feature] VCS datetime Tokens #1729

Open
matray opened this issue Nov 23, 2024 · 3 comments
Open

[feature] VCS datetime Tokens #1729

matray opened this issue Nov 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@matray
Copy link

matray commented Nov 23, 2024

Is your feature request related to a problem? Please describe.

Tokens for timestamps from VCS for reproducible builds with meaningful metadata.

Describe the solution you'd like

Tokens are super useful to leverage metadata in build tasks. However, the existing date/time tokens don't allow for reproducible building. As moon already hooks in to the configured VCS, it would be nice to expose timestamps that are VCS-intelligent, like commit timestamps. This allows build tasks to be reproducible and potentially more cache-able.

To preserve the potentially useful for other reasons dateTime tokens, perhaps these are exposed with the prefix of vcs. e.g. vcsDatetime, vcsDate, vcsTime, vcsTimestamp

Describe alternatives you've considered

Right now we just leverage script blocks in commands to extract this metadata ourselves. Directly going to git works, but it's not as nice as grabbing metadata from the project.

@matray matray added the enhancement New feature or request label Nov 23, 2024
@matray
Copy link
Author

matray commented Nov 23, 2024

This might be an extension of #1639, I see mentioned that token layer has no VCS intelligence at the current point in time.

@matray
Copy link
Author

matray commented Nov 23, 2024

Oh nice! I see there's already some progress on that front coming in 1.30, incredible #1718

@milesj
Copy link
Collaborator

milesj commented Nov 26, 2024

v1.30 is out, is $vcsRevision enough here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants