From 0286f83c9af12c60d176ee69bab62286d65c56bc Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Fri, 23 Dec 2022 17:09:33 -0500 Subject: [PATCH] Ensure Windows launcher prints version to console on `launcher.exe version` (#982) --- .github/workflows/go.yml | 20 ++++++++++++++++++++ pkg/make/builder.go | 5 ----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 50f39d876..e312d0165 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -79,6 +79,26 @@ jobs: - name: Test run: make test + # Launcher should always print its version info when called with `version` -- this is a quick + # check to ensure that launcher can update to this build. + - name: Test build - macOS and ubuntu + if: ${{ contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') }} + run: | + if [[ $(./build/launcher --version) != *"launcher - version"* ]]; then + echo "launcher version did not print version information" + exit 1 + fi + + # Launcher should always print its version info when called with `version` -- this is a quick + # check to ensure that launcher can update to this build. + - name: Test build - Windows + if: ${{ contains(matrix.os, 'windows') }} + shell: powershell + run: | + if(-not (.\build\launcher.exe --version | findstr "launcher - version")) { + throw "launcher.exe version did not print version information" + } + - name: Upload Build - Windows if: ${{ contains(matrix.os, 'windows') }} uses: actions/upload-artifact@v2 diff --git a/pkg/make/builder.go b/pkg/make/builder.go index a6ddc7cc7..38f3b3751 100644 --- a/pkg/make/builder.go +++ b/pkg/make/builder.go @@ -509,11 +509,6 @@ func (b *Builder) BuildCmd(src, appName string) func(context.Context) error { ldFlags = append(ldFlags, "-w -s") } - if b.os == "windows" { - // this prevents a cmd prompt opening up when desktop is launched - ldFlags = append(ldFlags, "-H windowsgui") - } - if b.stampVersion { v, err := b.getVersion(ctx) if err != nil {