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

feat: Add template params for git #1307

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

nmittler
Copy link
Contributor

@nmittler nmittler commented May 11, 2024

This includes a number of template parameters supported by goreleaser. Specifically, the build date information and the majority of the Git params.

Majority of the code is copied from goreleaser. I've added the MIT license from goreleaser at the top of the files.

Fixes #493

@nmittler nmittler force-pushed the git-params branch 2 times, most recently from aa9d11d to 2cd8f0e Compare May 12, 2024 13:55
@nmittler
Copy link
Contributor Author

It seems that the vendoring is causing issues with including dependencies like testify. I've reverted the mod/vendor changes in favor of just hand-rolling requireXXX methods.

@nmittler nmittler changed the title feat: Add git common build template params feat: Add template params for git May 12, 2024
@nmittler nmittler force-pushed the git-params branch 5 times, most recently from bd46af2 to 9f0d938 Compare May 15, 2024 13:27
pkg/build/gobuild.go Outdated Show resolved Hide resolved
Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Copying Slack thread comment for posterity:

Do you intend to use all of these template features? I'm a little wary of speculatively adding features that we don't intend to use and get value from. If it's to keep compatibility with goreleaser I can understand, but that's also a moving target. 😕
I don't tend to use the goreleaser features myself to be honest, so I may be especially biased against this. If you or others do get value from that though I'm happy to approve.

@nmittler nmittler force-pushed the git-params branch 2 times, most recently from b4a678f to eda6b0d Compare May 15, 2024 15:16
@nmittler
Copy link
Contributor Author

@imjasonh I've trimmed down variables to a minimum set that I need (and I suspect should be sufficient for @embano1 as well). PTAL

This includes a number of template parameters supported by [goreleaser](https://goreleaser.com/customization/templates/). Specifically, the build date information and the majority of the Git params.

Majority of the code is copied from goreleaser. I've added the MIT license from goreleaser at the top of the files.

Fixes ko-build#493

Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
@imjasonh imjasonh enabled auto-merge (rebase) May 15, 2024 15:27
@imjasonh imjasonh merged commit 4dbf90f into ko-build:main May 15, 2024
21 checks passed
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.

Define common build tags to consume in .ko.yaml
2 participants