Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix releaser archive naming (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
peakle authored Aug 30, 2022
1 parent 836e13f commit 3002df6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions releaser/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
)

const (
Expand All @@ -27,10 +28,11 @@ func (p platformInfo) String() string { return p.goos + "-" + p.goarch }
func main() {
log.SetFlags(0)

version := flag.String("version", "", "dcRules release version")
versionFlag := flag.String("version", "", "dcRules release version")
flag.Parse()

if *version == "" {
version := strings.TrimLeft(*versionFlag, "v")
if version == "" {
log.Fatal("version argument is not set")
}

Expand All @@ -49,15 +51,15 @@ func main() {
return
}

checksums, err := os.Create(filepath.Join(releaseDir, projectName+"-"+*version+"-checksums.txt"))
checksums, err := os.Create(filepath.Join(releaseDir, projectName+"-"+version+"-checksums.txt"))
if err != nil {
log.Printf("on create checksums: %s", err)
return
}
defer checksums.Close()

for _, platform := range platforms {
if err = prepareArchive(checksums, platform, *version); err != nil {
if err = prepareArchive(checksums, platform, version); err != nil {
log.Printf("error: build %s: %v", platform, err)
return
}
Expand Down

0 comments on commit 3002df6

Please sign in to comment.