From 3835555127fefb5ba2fa0d53f177f8d694ac0a33 Mon Sep 17 00:00:00 2001 From: Karl Johan Grahn Date: Tue, 17 Sep 2024 15:32:00 +0200 Subject: [PATCH] update --- .gitignore | 3 ++- .goreleaser.yml | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 418282b..98993f8 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,5 @@ bin *~ .local testbin -.vscode \ No newline at end of file +.vscode +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 158067a..fe67330 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,7 +1,10 @@ +version: 2 + before: hooks: - go mod download - go generate ./... + builds: - env: - CGO_ENABLED=0 @@ -9,20 +12,30 @@ builds: - linux - windows - darwin + archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ .Tag }}-next" + version_template: "{{ .Tag }}-next" + changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - "^docs:" + - "^test:"