5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 23:21:58 +08:00

Add tags to build

This commit is contained in:
Lea Anthony 2020-10-25 20:44:44 +11:00
parent f87a0f039a
commit 9098632aa3

View File

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