From 1d0c454397599bcacd34f6c164721138889a3956 Mon Sep 17 00:00:00 2001 From: Frederik Martini Date: Wed, 19 Mar 2025 14:57:12 +0100 Subject: [PATCH] fix linux build --- .github/workflows/release.yml | 4 ++-- cmd/version.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 928c7cb..569d14a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,12 +47,12 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Build ${{ env.OS_GOOS }}/${{ env.OS_GOARCH }} - run: GOOS=${{ env.OS_GOOS }} GOARCH=${{ env.OS_GOARCH }} go build -ldflags "-X ${{ github.event.repository.name }}/cmd.version=${{ env.VERSION }}" + run: GOOS=${{ env.OS_GOOS }} GOARCH=${{ env.OS_GOARCH }} go build -o ${{ env.EXECUTABLE_NAME }} -ldflags "-X ${{ github.event.repository.name }}/cmd.version=${{ env.VERSION }}" shell: bash - name: Append .exe to Windows executable run: | - if [ "${{ OS_GOOS }}" = "windows" ]; then + if [ ${{ env.OS_GOOS }} = "windows" ]; then mv ${{ env.EXECUTABLE_NAME }} ${{ env.EXECUTABLE_NAME }}.exe fi diff --git a/cmd/version.go b/cmd/version.go index 461ea57..ff27d91 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -2,7 +2,7 @@ package cmd import ( "context" - "log" + "fmt" "github.com/urfave/cli/v3" ) @@ -15,7 +15,7 @@ func newVersion() *cli.Command { Aliases: []string{"v"}, Usage: "Show version", Action: func(_ context.Context, command *cli.Command) error { - log.Println(version) + fmt.Println(version) return nil },