diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e312d0165..249cfc966 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -79,24 +79,25 @@ jobs: - name: Test run: make test - # Launcher should always print its version info when called with `version` -- this is a quick + # Launcher should always successfully run and exit cleanly 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" + if ! ./build/launcher --version; then + echo "launcher.exe --version failed" exit 1 fi - # Launcher should always print its version info when called with `version` -- this is a quick + # Launcher should always successfully run and exit cleanly 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" + .\build\launcher.exe --version + if( !$? ) { + throw "launcher.exe --version failed" } - name: Upload Build - Windows diff --git a/pkg/make/builder.go b/pkg/make/builder.go index 38f3b3751..a6ddc7cc7 100644 --- a/pkg/make/builder.go +++ b/pkg/make/builder.go @@ -509,6 +509,11 @@ 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 {