Skip to content

Commit

Permalink
fix riscv64 makefile (#26)
Browse files Browse the repository at this point in the history
* fix riscv64 makefile

* update version
  • Loading branch information
zxln007 authored Apr 12, 2024
1 parent 1bbac73 commit b37c19f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 5 additions & 7 deletions Makefile.riscv64
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit b37c19f

Please sign in to comment.