-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (38 loc) · 850 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Makefile
REGISTRY ?= registry-1.ict-mec.net:18443/qwen-cli
TAG ?=
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
GOOS ?= $(shell go env GOHOSTOS)
GOARCH ?= $(shell go env GOARCH)
COMMIT_REF ?= $(shell git rev-parse --verify HEAD)
BOILERPLATE_DIR = $(shell pwd)/hack
GOPROXY ?= https://goproxy.cn,direct
GOVERSION ?= 1.21.4
APP ?=
ifeq ($(APP),)
apps = $(shell ls cmd)
else
apps = $(APP)
endif
RACE ?=
ifeq ($(RACE),on)
race = "-race"
endif
TAG ?=
ifeq ($(TAG),)
TAG = $(COMMIT_REF)
endif
.PHONY: test-all
test-all:
ginkgo -r -v
.PHONY: fmt
fmt:
gofmt -w pkg cmd
.PHONY: go-build
go-build:
CGO_ENABLED=0 go build -o cmd/qwen/qwen-cli -ldflags "-X 'main.app.version.version=${TAG}'" cmd/qwen/main.go