Skip to content

Commit 7dc111a

Browse files
authored
go-releaser (#60)
* docs: spelling * chores: fix `go-releaser`
1 parent 5460db3 commit 7dc111a

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

.goreleaser.yaml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,17 @@ builds:
55
- binary: mirror
66
env:
77
- CGO_ENABLED=0
8+
main: ./cmd/mirror/
9+
flags:
10+
- -trimpath
11+
ldflags: -s -w
812
goos:
9-
- darwin
1013
- linux
14+
- darwin
1115
- windows
1216
goarch:
1317
- amd64
14-
- 386
1518
- arm64
16-
- arm
17-
goarm:
18-
- 6
19-
ignore:
20-
- goos: windows
21-
goarm: 6
22-
- goos: windows
23-
goarch: arm64
24-
- goos: linux
25-
goarm: 6
26-
- goos: darwin
27-
goarch: 386
28-
main: ./cmd/mirror/
29-
flags:
30-
- -trimpath
31-
ldflags: -s -w
32-
33-
checksum:
34-
name_template: 'checksums.txt'
3519

3620
changelog:
3721
sort: asc
@@ -45,14 +29,15 @@ changelog:
4529
- Merge pull request
4630
- Merge branch
4731

32+
33+
checksum:
34+
name_template: 'checksums.txt'
35+
36+
4837
archives:
49-
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
50-
replacements:
51-
darwin: darwin
52-
linux: linux
53-
windows: windows
54-
386: i386
55-
amd64: x86_64
38+
- format: tar.gz
39+
name_template: >-
40+
{{ .ProjectName }}_{{- tolower .Os }}_{{ .Arch }}
5641
format_overrides:
5742
- goos: windows
5843
format: zip

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ cover: ## Run Coverage
6262

6363
test-release: bin/goreleaser
6464
goreleaser release --help
65-
goreleaser release -f .goreleaser.yaml \
66-
--skip-validate --skip-publish --clean
65+
goreleaser release --skip=publish --skip=validate --clean
6766

6867
# Install ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6968

@@ -77,8 +76,8 @@ bin/golangci-lint: INSTALL_URL=github.com/golangci/golangci-lint@v1.55.2
7776
bin/golangci-lint:
7877
$(call install_go_bin, golangci-lint, $(INSTALL_URL))
7978

80-
bin/goreleaser: ## Installs golangci-lint@v1.17.2 (if not exists)
81-
bin/goreleaser: INSTALL_URL=github.com/goreleaser/goreleaser-lint@v1.17.2
79+
bin/goreleaser: ## Installs goreleaser@v1.24.0 (if not exists)
80+
bin/goreleaser: INSTALL_URL=github.com/goreleaser/goreleaser@v1.24.0
8281
bin/goreleaser:
8382
$(call install_go_bin, goreleaser, $(INSTALL_URL))
8483

0 commit comments

Comments
 (0)