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 builtin support for git author timestamps #2462

Merged
merged 3 commits into from Dec 1, 2022

Conversation

miles170
Copy link
Contributor

Closes #2432.

Add EARTHLY_GIT_COMMIT_AUTHOR_TIMESTAMP, which points to the git author timestamp.

@alexcb alexcb self-requested a review November 30, 2022 18:25
Copy link
Collaborator

@alexcb alexcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awesome, thanks for the contribution!

Can you create a new feature flag for this? that way users will have to explicitly enable it via VERSION --git-commit-author-timestamp 0.6

that way if an Earthfile depends on this feature, and a user is using an old version of earthly, the user will get an error such as "unknown feature-flag git-commit-author-timestamp" rather than have the ARG set to "".

Check out this commit (in particular the addition to features/features.go) to see how we've done this for previous newly introduced ARGs:

e20c10483#diff-a8b6135d50534471326ea7bcd20e0f5eae25353f7788338060f718128a6a0b34R30

@miles170 miles170 requested a review from alexcb December 1, 2022 07:15
Copy link
Collaborator

@alexcb alexcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the changes!

@alexcb alexcb merged commit 781afff into earthly:main Dec 1, 2022
@miles170 miles170 deleted the issue-2432-git-commit-timestamp branch December 2, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have a git commit date in addition to the git author date
2 participants