variable "GO_VERSION" { default = "1.16.7" } # Defines the output folder variable "DESTDIR" { default = "" } function "bindir" { params = [defaultdir] result = DESTDIR != "" ? DESTDIR : "./bin/${defaultdir}" } target "_common" { args = { GO_VERSION = GO_VERSION } } group "default" { targets = ["binaries"] } target "test" { inherits = ["_common"] target = "test-coverage" output = [bindir("coverage")] } target "binaries" { inherits = ["_common"] target = "binaries" output = [bindir("build")] platforms = [ "darwin/amd64", "darwin/arm64", "linux/amd64", "linux/arm64", "linux/arm/v7", "linux/arm/v6", "windows/amd64" ] }