Skip to content

Commit

Permalink
go-releaser (#60)
Browse files Browse the repository at this point in the history
* docs: spelling

* chores: fix `go-releaser`
  • Loading branch information
butuzov authored Mar 31, 2024
1 parent 5460db3 commit 7dc111a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 32 deletions.
41 changes: 13 additions & 28 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,17 @@ builds:
- binary: mirror
env:
- CGO_ENABLED=0
main: ./cmd/mirror/
flags:
- -trimpath
ldflags: -s -w
goos:
- darwin
- linux
- darwin
- windows
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 6
ignore:
- goos: windows
goarm: 6
- goos: windows
goarch: arm64
- goos: linux
goarm: 6
- goos: darwin
goarch: 386
main: ./cmd/mirror/
flags:
- -trimpath
ldflags: -s -w

checksum:
name_template: 'checksums.txt'

changelog:
sort: asc
Expand All @@ -45,14 +29,15 @@ changelog:
- Merge pull request
- Merge branch


checksum:
name_template: 'checksums.txt'


archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
replacements:
darwin: darwin
linux: linux
windows: windows
386: i386
amd64: x86_64
- format: tar.gz
name_template: >-
{{ .ProjectName }}_{{- tolower .Os }}_{{ .Arch }}
format_overrides:
- goos: windows
format: zip
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ cover: ## Run Coverage

test-release: bin/goreleaser
goreleaser release --help
goreleaser release -f .goreleaser.yaml \
--skip-validate --skip-publish --clean
goreleaser release --skip=publish --skip=validate --clean

# Install ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -77,8 +76,8 @@ bin/golangci-lint: INSTALL_URL=github.com/golangci/[email protected]
bin/golangci-lint:
$(call install_go_bin, golangci-lint, $(INSTALL_URL))

bin/goreleaser: ## Installs golangci-lint@v1.17.2 (if not exists)
bin/goreleaser: INSTALL_URL=github.com/goreleaser/goreleaser-lint@v1.17.2
bin/goreleaser: ## Installs goreleaser@v1.24.0 (if not exists)
bin/goreleaser: INSTALL_URL=github.com/goreleaser/goreleaser@v1.24.0
bin/goreleaser:
$(call install_go_bin, goreleaser, $(INSTALL_URL))

Expand Down

0 comments on commit 7dc111a

Please sign in to comment.