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 example on how to set up version flags via magefile #11

Open
mszostok opened this issue Jul 28, 2022 · 0 comments
Open

Add example on how to set up version flags via magefile #11

mszostok opened this issue Jul 28, 2022 · 0 comments
Labels
area/integration Integration with external libs

Comments

@mszostok
Copy link
Owner

mszostok commented Jul 28, 2022

Description

Add example on how to set up version flags via magefile.

We can add similar function as this one:
https://github.com/getporter/magefiles/blob/5a76d0fb3bc9d58ecb0e568eeda9fa97fd607443/releases/build.go#L20-L35

Reason

User can build an application without the hassle of setting -ldflags by yourself. Example:

// Use local OS and arch
// release.Build("src", "dst")
release.Build("cmd/client", "./bin/client")

// Use a given OS and arch
// release.Build("src", "dst", "GOOS", "GOARCH")
release.Build("cmd/client", "./bin/client", "linux", "amd64")
@mszostok mszostok added enhancement New feature or request area/integration Integration with external libs and removed enhancement New feature or request labels Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/integration Integration with external libs
Projects
Status: No status
Development

No branches or pull requests

1 participant