Skip to content

Commit

Permalink
gorelease编译程序
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomeng79 committed Oct 9, 2019
1 parent 54fa548 commit 915183f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
49 changes: 24 additions & 25 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
builds:
- binary: srv-account
- id: "srv-account"
binary: srv-account
main: ./cmd/srv/account.go
goos:
# - windows
Expand All @@ -9,34 +10,32 @@ builds:
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 6
- 7
#- binary: srv-user
# main: ./cmd/srv/user.go
# goos:
# - windows
# - darwin
# - linux
# - freebsd
# goarch:
# - amd64
# - 386
# - arm
# - arm64
# goarm:
goarm:
# - 6
# - 7
#archive:
# name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
# replacements:
# darwin: Darwin
# linux: Linux
- id: "srv-user"
binary: srv-user
main: ./cmd/srv/user.go
goos:
- linux
- freebsd
goarch:
- amd64
- 386
goarm:
archives:
- id: default
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: macOS
# windows: Windows
# 386: i386
# amd64: x86_64
# format_overrides:
# - goos: windows
# format: zip
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
algorithm: sha256
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,7 @@ docker-kill:
docker-remove:
docker rm --force `docker ps -a -q` || true
docker rmi --force `docker images -q` || true

# 使用goreleaser编译项目
release:
goreleaser --snapshot --skip-publish --rm-dist

0 comments on commit 915183f

Please sign in to comment.