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

expose a clone of the embedded build info for others to use. #3

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# buildinfo tools

The tools in this module are used to generate code for bootstrapping
applications for use with [buildinfo](https://github.com/UiP9AV6Y/buildinfo),
or to extract version information from the current environment for
embedding into the application build output.
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/UiP9AV6Y/buildinfo/tools
go 1.19

require (
github.com/UiP9AV6Y/buildinfo v0.0.0-20231118114407-a0fa77164a70
github.com/UiP9AV6Y/buildinfo v0.0.0-20240313195626-97a50b40242a
github.com/go-kit/log v0.2.1
gotest.tools/v3 v3.5.1
)
Expand Down
4 changes: 2 additions & 2 deletions tools/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/UiP9AV6Y/buildinfo v0.0.0-20231118114407-a0fa77164a70 h1:FY43764yCaKPS6MGdKE6Co/9rdt4I8vXqgO+4ieEZOU=
github.com/UiP9AV6Y/buildinfo v0.0.0-20231118114407-a0fa77164a70/go.mod h1:xOw/nvP1ol539jLd1YV6oueyGt8h7RaQ0+r2PHDhidk=
github.com/UiP9AV6Y/buildinfo v0.0.0-20240313195626-97a50b40242a h1:a2IDIfV2Smoe+mwj553zsTglo67fsMPN05tjBRpT4J0=
github.com/UiP9AV6Y/buildinfo v0.0.0-20240313195626-97a50b40242a/go.mod h1:JQKMnAuoFntCA2Lrxfl46yZRuhPPUNsq4Z9Dh03uqPA=
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
Expand Down
6 changes: 6 additions & 0 deletions tools/renderer/golang/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ func Version() string {
func Print(program string) string {
return buildInfo.Print(program)
}

// BuildInfo creates an independent copy of the internal
// build information.
func BuildInfo() *buildinfo.BuildInfo {
return buildInfo.Clone()
}
`
)

Expand Down
6 changes: 6 additions & 0 deletions tools/renderer/golang/testdata/args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ func Version() string {
func Print(program string) string {
return buildInfo.Print(program)
}

// BuildInfo creates an independent copy of the internal
// build information.
func BuildInfo() *buildinfo.BuildInfo {
return buildInfo.Clone()
}
6 changes: 6 additions & 0 deletions tools/renderer/golang/testdata/embed.golden
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ func Version() string {
func Print(program string) string {
return buildInfo.Print(program)
}

// BuildInfo creates an independent copy of the internal
// build information.
func BuildInfo() *buildinfo.BuildInfo {
return buildInfo.Clone()
}
6 changes: 6 additions & 0 deletions tools/version/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading