From 4bfc78357737dbcded645f83b22ffdd61317619f Mon Sep 17 00:00:00 2001 From: Skyxim Date: Sun, 1 May 2022 13:10:30 +0800 Subject: [PATCH] chore: modify makefile --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e5d70c57..c221ea79 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ NAME=Clash.Meta BINDIR=bin BRANCH=$(shell git rev-parse --abbrev-ref HEAD) -VERSION="unknown" -ifeq ($BRANCH,"Aplpha") +ifeq ($(BRANCH),Alpha) VERSION=alpha-$(shell git rev-parse --short HEAD) -ifeq ($BRANCH,"Beta") +else ifeq ($(BRANCH),Beta) VERSION=beta-$(shell git rev-parse --short HEAD) -ifeq ($BRANCH,"Meta") +else ifeq ($(BRANCH),Meta) VERSION=$(shell git describe --tags) +else +VERSION=unknown +endif BUILDTIME=$(shell date -u) GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \