From b37c19f404ce2be8eaaca200e1dc5038745b2867 Mon Sep 17 00:00:00 2001 From: Xuyang Zhang Date: Fri, 12 Apr 2024 09:25:15 +0800 Subject: [PATCH] fix riscv64 makefile (#26) * fix riscv64 makefile * update version --- Makefile | 2 +- Makefile.amd64 | 2 +- Makefile.riscv64 | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 388d10c..7166553 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ EXE=$(NAME)$(shell go env GOEXE) DATE=$(shell date '+%F-%T') BRANCH=$(shell git symbolic-ref HEAD | cut -d"/" -f 3) COMMIT=$(shell git rev-parse HEAD | cut -c1-7) -VERSIONNUMBER="1.0.1" +VERSIONNUMBER="1.0.2" VERSION=$(NAME)--"Agent-"$(VERSIONNUMBER)--$(DATE)-$(BRANCH)-$(COMMIT) LDFLAGS=-ldflags "-s -w -X 'main.Version=${VERSION}' -X 'main.VersionNumber=${VERSIONNUMBER}'" SOURCES=$(shell ls **/*.go) diff --git a/Makefile.amd64 b/Makefile.amd64 index e15f18b..97a0d12 100644 --- a/Makefile.amd64 +++ b/Makefile.amd64 @@ -18,7 +18,7 @@ DATE=$(shell date '+%F-%T') BRANCH=$(shell git symbolic-ref HEAD | cut -d"/" -f 3) COMMIT=$(shell git rev-parse HEAD | cut -c1-7) ARCH ?= amd64 -VERSIONNUMBER="1.0.1" +VERSIONNUMBER="1.0.2" VERSION=$(NAME)--"Agent-"$(VERSIONNUMBER)--$(DATE)-$(BRANCH)-$(COMMIT) LDFLAGS=-ldflags "-s -w -X 'main.Version=${VERSION}' -X 'main.VersionNumber=${VERSIONNUMBER}'" SOURCES=$(shell ls **/*.go) diff --git a/Makefile.riscv64 b/Makefile.riscv64 index 63ad2a5..4a2b190 100644 --- a/Makefile.riscv64 +++ b/Makefile.riscv64 @@ -18,7 +18,7 @@ DATE=$(shell date '+%F-%T') BRANCH=$(shell git symbolic-ref HEAD | cut -d"/" -f 3) COMMIT=$(shell git rev-parse HEAD | cut -c1-7) ARCH ?= riscv64 -VERSIONNUMBER="1.0.1" +VERSIONNUMBER="1.0.2" VERSION=$(NAME)--"Agent-"$(VERSIONNUMBER)--$(DATE)-$(BRANCH)-$(COMMIT) LDFLAGS=-ldflags "-s -w -X 'main.Version=${VERSION}' -X 'main.VersionNumber=${VERSIONNUMBER}'" SOURCES=$(shell ls **/*.go) @@ -28,12 +28,10 @@ all: exe .PHONY: exe exe: $(SOURCES) Makefile - echo "building..." - #swag init -g biz/web/http_server.go - go env -w GO111MODULE=on - go env -w GOPROXY="https://goproxy.io,direct" - # GOOS=linux GOARCH=${ARCH} go build $(OPTIONS) $(LDFLAGS) -o build/$(NAME) - go build $(OPTIONS) $(LDFLAGS) -o build/$(NAME) + echo "building..." + go env -w GO111MODULE=on + go env -w GOPROXY="https://goproxy.io,direct" + go build $(OPTIONS) $(LDFLAGS) -o build/$(NAME) .PHONY: clean clean: