5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 06:20:48 +08:00

[cli] Fix applying default arch to platform flag (#2309)

This commit is contained in:
stffabi 2023-01-17 20:39:15 +01:00 committed by GitHub
parent caa0b6c804
commit 45c3a501d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -2,14 +2,15 @@ package flags
import ( import (
"fmt" "fmt"
"github.com/leaanthony/slicer"
"github.com/wailsapp/wails/v2/internal/system"
"github.com/wailsapp/wails/v2/pkg/commands/build"
"github.com/wailsapp/wails/v2/pkg/commands/buildtags"
"os" "os"
"os/exec" "os/exec"
"runtime" "runtime"
"strings" "strings"
"github.com/leaanthony/slicer"
"github.com/wailsapp/wails/v2/internal/system"
"github.com/wailsapp/wails/v2/pkg/commands/build"
"github.com/wailsapp/wails/v2/pkg/commands/buildtags"
) )
const ( const (
@ -51,7 +52,6 @@ type Build struct {
} }
func (b *Build) Default() *Build { func (b *Build) Default() *Build {
defaultPlatform := os.Getenv("GOOS") defaultPlatform := os.Getenv("GOOS")
if defaultPlatform == "" { if defaultPlatform == "" {
defaultPlatform = runtime.GOOS defaultPlatform = runtime.GOOS
@ -64,13 +64,13 @@ func (b *Build) Default() *Build {
defaultArch = runtime.GOARCH defaultArch = runtime.GOARCH
} }
} }
b.defaultArch = defaultArch
platform := defaultPlatform + "/" + defaultArch
result := &Build{ result := &Build{
Platform: platform, Platform: defaultPlatform + "/" + defaultArch,
WebView2: "download", WebView2: "download",
GarbleArgs: "-literals -tiny -seed=random", GarbleArgs: "-literals -tiny -seed=random",
defaultArch: defaultArch,
} }
result.BuildCommon = result.BuildCommon.Default() result.BuildCommon = result.BuildCommon.Default()
return result return result

View File

@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed set window background colour on Windows when setting the colour via runtime. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2279) - Fixed set window background colour on Windows when setting the colour via runtime. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2279)
- Fixed the showing of a white border around a fullscreen window when `DisableWindowIcon` is active on Windows. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2299) - Fixed the showing of a white border around a fullscreen window when `DisableWindowIcon` is active on Windows. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2299)
- Fixed the sometimes lagging drag experience with `--wails-draggable` on Windows. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2302) - Fixed the sometimes lagging drag experience with `--wails-draggable` on Windows. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2302)
- Fixed applying the default arch to platform flag in wails cli. If only a `GOOS` has been supplied as platform flag e.g. `wails build --platform windows` the current architecture wasn't applied and the build failed. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2309)
## v2.3.0 - 2022-12-29 ## v2.3.0 - 2022-12-29