Update Makefile
This commit is contained in:
parent
1f6d732eed
commit
10013bb097
1 changed files with 6 additions and 2 deletions
8
Makefile
8
Makefile
|
@ -1,6 +1,10 @@
|
||||||
NAME=Clash.Meta
|
NAME=Clash.Meta
|
||||||
BINDIR=bin
|
BINDIR=bin
|
||||||
VERSION=$(shell git describe --tags || echo "unknown version")
|
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
|
||||||
|
VERSION=$(shell git describe --tags || echo "unknown version" )
|
||||||
|
ifeq ($(BRANCH),Dev)
|
||||||
|
VERSION=$(shell git rev-parse --short HEAD)
|
||||||
|
endif
|
||||||
BUILDTIME=$(shell date -u)
|
BUILDTIME=$(shell date -u)
|
||||||
AUTOIPTABLES=Enable
|
AUTOIPTABLES=Enable
|
||||||
GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \
|
GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \
|
||||||
|
@ -145,4 +149,4 @@ all-arch: $(PLATFORM_LIST) $(WINDOWS_ARCH_LIST)
|
||||||
|
|
||||||
releases: $(gz_releases) $(zip_releases)
|
releases: $(gz_releases) $(zip_releases)
|
||||||
clean:
|
clean:
|
||||||
rm $(BINDIR)/*
|
rm $(BINDIR)/*
|
||||||
|
|
Loading…
Reference in a new issue