From a56c9616adbf6f5c387a2ffc472cd42b6b9ba377 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Fri, 29 Jul 2022 23:54:45 +1200 Subject: [PATCH] Update release binary name --- .github/workflows/release-build.yml | 1 + updater/updater.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 59c3908..8fb4c6d 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -38,5 +38,6 @@ jobs: goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} binary_name: "mailpit" + asset_name: mailpit-${{ matrix.goos }}-${{ matrix.goarch }} extra_files: LICENSE README.md ldflags: -w -X "github.com/axllent/mailpit/cmd.Version=${{ steps.tag.outputs.tag }}" diff --git a/updater/updater.go b/updater/updater.go index 18ccc1c..8daa789 100644 --- a/updater/updater.go +++ b/updater/updater.go @@ -77,7 +77,7 @@ func GithubLatest(repo, name string) (string, string, string, error) { return "", "", "", err } - archiveName := fmt.Sprintf("%s_%s_%s%s", name, linkOS, linkArch, linkExt) + archiveName := fmt.Sprintf("%s-%s-%s%s", name, linkOS, linkArch, linkExt) // loop through releases for _, r := range releases { @@ -148,13 +148,13 @@ func GithubUpdate(repo, appName, currentVersion string) (string, error) { return "", err } - newExec := filepath.Join(tmpDir, "golp") + newExec := filepath.Join(tmpDir, "mailpit") if runtime.GOOS == "windows" { if _, err := Unzip(outFile, tmpDir); err != nil { return "", err } - newExec = filepath.Join(tmpDir, "golp.exe") + newExec = filepath.Join(tmpDir, "mailpit.exe") } else { if err := TarGZExtract(outFile, tmpDir); err != nil { return "", err