Skip to content

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

@mszostok

Description

@mszostok

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions