File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ PROG=rke2
2
2
GOLANGCI_VERSION =v1.25.1
3
3
REPO ?= rancher
4
4
IMAGE =${REPO}/rke2-runtime
5
- PKG =github.com/rancher/rke2
5
+ K3S_PKG =github.com/rancher/k3s
6
6
7
7
ifneq "$(strip $(shell command -v go 2>/dev/null) ) " ""
8
8
GOOS ?= $(shell go env GOOS)
39
39
DEBUG_GO_GCFLAGS := -gcflags=all="-N -l"
40
40
endif
41
41
42
- VERSION =$(shell git describe --match 'v[0-9]* ' --dirty='.dirty' --always --tags)
42
+ ifdef DRONE_TAG
43
+ VERSION=${DRONE_TAG}
44
+ else
45
+ VERSION?=$(shell git describe --match 'v[0-9]*' --dirty='.dirty' --always --tags)
46
+ endif
43
47
REVISION =$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .dirty; fi)
44
48
RELEASE =${PROG}-$(VERSION ) .${GOOS}-${GOARCH}
45
49
49
53
GO_BUILDTAGS ?= no_embedded_executor
50
54
GO_BUILDTAGS += ${DEBUG_TAGS}
51
55
GO_TAGS =$(if $(GO_BUILDTAGS ) ,-tags "$(GO_BUILDTAGS ) ",)
52
- GO_LDFLAGS =-ldflags '-X $(PKG ) / version.Program=$(PROG ) -X $(PKG ) / version.Version=$(VERSION ) -X $(PKG ) / version.Revision=$(REVISION ) -X $( PKG ) /version.Package= $( PACKAGE ) $(EXTRA_LDFLAGS ) '
56
+ GO_LDFLAGS =-ldflags '-X $(K3S_PKG ) /pkg/ version.Program=$(PROG ) -X $(K3S_PKG ) /pkg/ version.Version=$(VERSION ) -X $(K3S_PKG ) /pkg/ version.Revision=$(REVISION ) $(EXTRA_LDFLAGS ) '
53
57
54
58
55
59
default : in-docker-build # # Build using docker environment (default target)
Original file line number Diff line number Diff line change 16
16
commonFlag = []cli.Flag {
17
17
cli.StringFlag {
18
18
Name : "repo" ,
19
- Usage : "(image) Image repository to use for RKE2 images" ,
19
+ Usage : "(image) Image repository override for for RKE2 images" ,
20
20
EnvVar : "RKE2_REPO" ,
21
- Value : "rancher" ,
22
21
Destination : & config .Repo ,
23
22
},
24
23
}
You can’t perform that action at this time.
0 commit comments