From 203f18905252c7ab9db2f7e96e9148c315f01b18 Mon Sep 17 00:00:00 2001 From: ben chen Date: Tue, 12 Sep 2023 16:11:54 +0800 Subject: [PATCH] update: layout release --- layout/.goreleaser.yaml | 12 ++++++++++-- layout/Makefile | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/layout/.goreleaser.yaml b/layout/.goreleaser.yaml index a65edfe..1df0041 100644 --- a/layout/.goreleaser.yaml +++ b/layout/.goreleaser.yaml @@ -3,16 +3,24 @@ before: hooks: # You may remove this if you don't use go modules. - - go mod tidy + - go mod download # you may remove this if you don't need go generate - go generate ./... builds: - - env: + - id: go-mixplus + main: ./cmd + binary: main + env: - CGO_ENABLED=0 goos: - linux - windows - darwin + ldflags: + - -s -w -X main.build={{.Version}} + goarch: + - amd64 + - arm64 archives: - format: tar.gz diff --git a/layout/Makefile b/layout/Makefile index 77c475f..2d0d447 100755 --- a/layout/Makefile +++ b/layout/Makefile @@ -46,3 +46,8 @@ test: go fmt $(go list ./... | grep -v vendor/ | grep -v api/) go vet $(go list ./... | grep -v vendor/ | grep -v api/) go test -race $(go list ./... | grep -v vendor/ | grep -v api/) + +.PHONY: release +release: + echo "mixplus run make release" + goreleaser release --snapshot --clean