Skip to content

feat: add support for commitDate and commitSha in packages#545

Draft
lafrenierejm wants to merge 3 commits intoMic92:mainfrom
lafrenierejm:commit-sha-and-date
Draft

feat: add support for commitDate and commitSha in packages#545
lafrenierejm wants to merge 3 commits intoMic92:mainfrom
lafrenierejm:commit-sha-and-date

Conversation

@lafrenierejm
Copy link
Copy Markdown
Contributor

Enables nix-update to track and update commitDate and commitSha fields in package definitions. All version providers (GitHub, GitLab, Gitea, Bitbucket, SourceHut) parse commit dates from their APIs.

This is particularly useful for Go CLI modules, where it is common to embed the commit date and SHA in the binary via ldflags "-X main.commit" and "-X main.date", respectively.

When updating packages, commit dates are normalized to UTC and formatted with the "Z" suffix for consistency across providers.

@lafrenierejm
Copy link
Copy Markdown
Contributor Author

The test 4 failure is baffling. The failure is the "Gradle build daemon disappeared unexpectedly". I'm not sure how the changes in this PR could have caused Gradle to crash…

The test 7 failure seems like a pre-existing issue likely caused by policy changes made server-side at gitlab.gnome.org.

@lafrenierejm lafrenierejm marked this pull request as draft February 14, 2026 19:56
@Mic92 Mic92 force-pushed the commit-sha-and-date branch from f5893a8 to 5cb0e21 Compare February 15, 2026 17:17
@Mic92
Copy link
Copy Markdown
Owner

Mic92 commented Feb 15, 2026

pre-existing issues have been fixed in main.

@lafrenierejm lafrenierejm force-pushed the commit-sha-and-date branch 5 times, most recently from d746fd5 to 74003ad Compare February 15, 2026 21:16
@lafrenierejm lafrenierejm force-pushed the commit-sha-and-date branch from 74003ad to 198a66f Compare April 3, 2026 07:20
Enables nix-update to track and update commitDate and commitSha fields in
package definitions.

This is particularly useful for Go CLI modules, where it is common to embed the
commit SHA and date in the binary via ldflags "-X main.commit" and "-X
main.date", respectively.

When updating packages, commit dates are normalized to UTC and formatted with
the "Z" suffix for consistency across providers.
GitHub requires a series of API calls to retrieve the information about a tag's
corresponding commit.
@lafrenierejm lafrenierejm force-pushed the commit-sha-and-date branch from 198a66f to a92bb87 Compare April 3, 2026 22:05
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.

2 participants