-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix -compiler flag for build, dev and generate commands #3121
Changes from 4 commits
3f9ddfa
447faf0
9b1538a
9c547d2
ddd3556
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
package bindings | ||
|
||
import ( | ||
"github.com/matryer/is" | ||
"github.com/wailsapp/wails/v2/pkg/templates" | ||
"os" | ||
"path/filepath" | ||
"runtime" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/matryer/is" | ||
"github.com/wailsapp/wails/v2/pkg/templates" | ||
) | ||
|
||
const standardBindings = `// @ts-check | ||
Comment on lines
1
to
14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Please ensure that the changelog and documentation are updated to reflect the new changes introduced by this PR, especially the handling of the |
||
|
@@ -80,6 +81,7 @@ func TestGenerateBindings(t *testing.T) { | |
name: "should generate standard bindings with no user tags", | ||
options: Options{ | ||
ProjectDirectory: projectDir, | ||
Compiler: "go", | ||
GoModTidy: true, | ||
}, | ||
expectedBindings: standardBindings, | ||
|
@@ -90,6 +92,7 @@ func TestGenerateBindings(t *testing.T) { | |
name: "should generate bindings when given tags", | ||
options: Options{ | ||
ProjectDirectory: projectDir, | ||
Compiler: "go", | ||
Tags: []string{"test"}, | ||
GoModTidy: true, | ||
}, | ||
|
@@ -101,6 +104,7 @@ func TestGenerateBindings(t *testing.T) { | |
name: "should generate obfuscated bindings", | ||
options: Options{ | ||
ProjectDirectory: projectDir, | ||
Compiler: "go", | ||
Tags: []string{"obfuscated"}, | ||
GoModTidy: true, | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
shell.RunCommandWithEnv
function call at the end of theGenerateBindings
function should also respect theoptions.Compiler
value if it is intended to run a Go-related process.Committable suggestion