From c6d1b7aff4f7c88d83fd27898ac8d099095b94ae Mon Sep 17 00:00:00 2001 From: Skyxim Date: Sun, 1 May 2022 12:56:21 +0800 Subject: [PATCH] chore: modify github workflows --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 365ecf35..e5d70c57 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,14 @@ NAME=Clash.Meta BINDIR=bin BRANCH=$(shell git rev-parse --abbrev-ref HEAD) +VERSION="unknown" +ifeq ($BRANCH,"Aplpha") VERSION=alpha-$(shell git rev-parse --short HEAD) +ifeq ($BRANCH,"Beta") +VERSION=beta-$(shell git rev-parse --short HEAD) +ifeq ($BRANCH,"Meta") +VERSION=$(shell git describe --tags) + BUILDTIME=$(shell date -u) GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \ -X "github.com/Dreamacro/clash/constant.BuildTime=$(BUILDTIME)" \