mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Support user tags
This commit is contained in:
@@ -190,10 +190,11 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
|
||||
var tags slicer.StringSlicer
|
||||
tags.Add(options.OutputType)
|
||||
|
||||
tags.AddSlice(options.UserTags)
|
||||
if options.Mode == Debug {
|
||||
tags.Add("debug")
|
||||
}
|
||||
tags.Deduplicate()
|
||||
|
||||
// Add the output type build tag
|
||||
commands.Add("-tags")
|
||||
|
||||
@@ -29,6 +29,7 @@ var modeMap = []string{"Debug", "Production"}
|
||||
// Options contains all the build options as well as the project data
|
||||
type Options struct {
|
||||
LDFlags string // Optional flags to pass to linker
|
||||
UserTags []string // Tags to pass to the Go compiler
|
||||
Logger *clilogger.CLILogger // All output to the logger
|
||||
OutputType string // EG: desktop, server....
|
||||
Mode Mode // release or debug
|
||||
|
||||
Reference in New Issue
Block a user