chore: modify makefile
This commit is contained in:
parent
bfc0c9ecba
commit
4bfc783577
10
Makefile
10
Makefile
@ -1,13 +1,15 @@
|
|||||||
NAME=Clash.Meta
|
NAME=Clash.Meta
|
||||||
BINDIR=bin
|
BINDIR=bin
|
||||||
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
|
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
|
||||||
VERSION="unknown"
|
ifeq ($(BRANCH),Alpha)
|
||||||
ifeq ($BRANCH,"Aplpha")
|
|
||||||
VERSION=alpha-$(shell git rev-parse --short HEAD)
|
VERSION=alpha-$(shell git rev-parse --short HEAD)
|
||||||
ifeq ($BRANCH,"Beta")
|
else ifeq ($(BRANCH),Beta)
|
||||||
VERSION=beta-$(shell git rev-parse --short HEAD)
|
VERSION=beta-$(shell git rev-parse --short HEAD)
|
||||||
ifeq ($BRANCH,"Meta")
|
else ifeq ($(BRANCH),Meta)
|
||||||
VERSION=$(shell git describe --tags)
|
VERSION=$(shell git describe --tags)
|
||||||
|
else
|
||||||
|
VERSION=unknown
|
||||||
|
endif
|
||||||
|
|
||||||
BUILDTIME=$(shell date -u)
|
BUILDTIME=$(shell date -u)
|
||||||
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)" \
|
||||||
|
Reference in New Issue
Block a user