Skip to content
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

- add -m(skip go mod tidy) build flag to dev command #3275

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion v2/cmd/wails/flags/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type Build struct {
BuildCommon

NoPackage bool `name:"noPackage" description:"Skips platform specific packaging"`
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
Upx bool `description:"Compress final binary with UPX (if installed)"`
UpxFlags string `description:"Flags to pass to upx"`
Platform string `description:"Platform to target. Comma separate multiple platforms"`
Expand Down
1 change: 1 addition & 0 deletions v2/cmd/wails/flags/buildcommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type BuildCommon struct {
Verbosity int `name:"v" description:"Verbosity level (0 = quiet, 1 = normal, 2 = verbose)"`
Tags string `description:"Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"`
NoSyncGoMod bool `description:"Don't sync go.mod"`
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
}

func (c BuildCommon) Default() BuildCommon {
Expand Down
10 changes: 6 additions & 4 deletions v2/cmd/wails/internal/dev/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
return err
}

// Run go mod tidy to ensure we're up-to-date
err = runCommand(cwd, false, f.Compiler, "mod", "tidy")
if err != nil {
return err
if !f.SkipModTidy {
// Run go mod tidy to ensure we're up-to-date
err = runCommand(cwd, false, f.Compiler, "mod", "tidy")
if err != nil {
return err
}
}

buildOptions := f.GenerateBuildOptions()
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
- Added docs to help fix NixOs/Wayland font-size css issue. Added by @atterpac in [PR](https://github.com/wailsapp/wails/pull/3268)
- Added -m (skip `go mod tidy`) flag to dev command by @te5se in [PR](https://github.com/wailsapp/wails/pull/3275)

## v2.8.0 - 2024-02-08

Expand Down
Loading