5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 03:01:45 +08:00

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

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

* - add changelog entry for PR #3275
This commit is contained in:
te5se 2024-02-26 15:10:01 +05:00 committed by GitHub
parent bff2258aea
commit 65cef2f206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 5 deletions

View File

@ -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"`

View File

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

View File

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

View File

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