From 9098632aa3e76f1bcd8266ac78334f3496b7e8bb Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 25 Oct 2020 20:44:44 +1100 Subject: [PATCH] Add tags to build --- cmd/wails/4_build.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/wails/4_build.go b/cmd/wails/4_build.go index 79a53825..24f2f275 100644 --- a/cmd/wails/4_build.go +++ b/cmd/wails/4_build.go @@ -31,6 +31,7 @@ func init() { var verbose = false var platform = "" var ldflags = "" + var tags = "" buildSpinner := spinner.NewSpinner() buildSpinner.SetSpinSpeed(50) @@ -44,7 +45,8 @@ func init() { BoolFlag("verbose", "Verbose output", &verbose). StringFlag("t", "Generate Typescript definitions to given file (at runtime)", &typescriptFilename). StringFlag("ldflags", "Extra options for -ldflags", &ldflags). - StringFlag("gopath", "Specify your GOPATH location. Mounted to /go during cross-compilation.", &gopath) + StringFlag("gopath", "Specify your GOPATH location. Mounted to /go during cross-compilation.", &gopath). + StringFlag("tags", "Build tags to pass to the go compiler (quoted and space separated)", &tags) var b strings.Builder for _, plat := range getSupportedPlatforms() { @@ -106,6 +108,9 @@ func init() { projectOptions.LdFlags = ldflags projectOptions.GoPath = gopath + // Add tags + projectOptions.Tags = tags + // Validate config // Check if we have a frontend err = cmd.ValidateFrontendConfig(projectOptions)