mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v2] Run go mod tidy first to ensure deps are up to date
This commit is contained in:
parent
ef362a746a
commit
d28a7e8987
1 changed files with 16 additions and 3 deletions
|
|
@ -107,9 +107,13 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Generate wailsjs module
|
||||
LogGreen("Generating wailsjs module...")
|
||||
_, _, err = shell.RunCommand(cwd, "wails", "generate", "module")
|
||||
// Run go mod tidy to ensure we're up to date
|
||||
err = runCommand(cwd, "go", "mod", "tidy")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = runCommand(cwd, "wails", "generate", "module")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -191,6 +195,15 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func runCommand(cwd string, command string, args ...string) error {
|
||||
LogGreen("Executing: " + command + " " + strings.Join(args, " "))
|
||||
_, _, err := shell.RunCommand(cwd, command, args...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// defaultDevFlags generates devFlags with default options
|
||||
func defaultDevFlags() devFlags {
|
||||
return devFlags{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue