mirror of
https://github.com/strongdm/comply
synced 2025-02-23 02:55:13 +00:00
define version immediately before use
This commit is contained in:
parent
5a58efd983
commit
57ea96e4c9
7
Makefile
7
Makefile
@ -1,8 +1,6 @@
|
|||||||
.DEFAULT_GOAL := comply
|
.DEFAULT_GOAL := comply
|
||||||
GO_SOURCES := $(shell find . -name '*.go')
|
GO_SOURCES := $(shell find . -name '*.go')
|
||||||
THEME_SOURCES := $(shell find themes)
|
THEME_SOURCES := $(shell find themes)
|
||||||
VERSION := $(shell git describe --tags --always --dirty="-dev")
|
|
||||||
LDFLAGS := -ldflags='-X "cli.Version=$(VERSION)"'
|
|
||||||
|
|
||||||
assets: $(THEME_SOURCES)
|
assets: $(THEME_SOURCES)
|
||||||
go-bindata-assetfs -pkg theme -prefix themes themes/...
|
go-bindata-assetfs -pkg theme -prefix themes themes/...
|
||||||
@ -12,6 +10,8 @@ comply: assets $(GO_SOURCES)
|
|||||||
go build github.com/strongdm/comply/cmd/comply
|
go build github.com/strongdm/comply/cmd/comply
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
|
$(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
||||||
|
$(eval LDFLAGS := -ldflags='-X "cli.Version=$(VERSION)"')
|
||||||
mkdir dist
|
mkdir dist
|
||||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o dist/comply-$(VERSION)-darwin-amd64 github.com/strongdm/comply/cmd/comply
|
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o dist/comply-$(VERSION)-darwin-amd64 github.com/strongdm/comply/cmd/comply
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o dist/comply-$(VERSION)-linux-amd64 github.com/strongdm/comply/cmd/comply
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o dist/comply-$(VERSION)-linux-amd64 github.com/strongdm/comply/cmd/comply
|
||||||
@ -46,6 +46,7 @@ cleanse:
|
|||||||
git gc --aggressive --prune=all
|
git gc --aggressive --prune=all
|
||||||
|
|
||||||
release: dist release-deps
|
release: dist release-deps
|
||||||
|
$(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
||||||
github-release release \
|
github-release release \
|
||||||
--security-token $$GH_LOGIN \
|
--security-token $$GH_LOGIN \
|
||||||
--user strongdm \
|
--user strongdm \
|
||||||
@ -75,8 +76,6 @@ patch: clean gitsem
|
|||||||
gitsem patch
|
gitsem patch
|
||||||
git push
|
git push
|
||||||
git push origin --tags
|
git push origin --tags
|
||||||
$(eval VERSION = $(shell git describe --tags --always --dirty="-dev"))
|
|
||||||
echo "--> $(VERSION)"
|
|
||||||
|
|
||||||
release-deps: gitsem gh-release
|
release-deps: gitsem gh-release
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user