mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Add v1 and v2alpha1 switch (#668)
This commit is contained in:
parent
0a97585cbe
commit
a03121eb60
1 changed files with 30 additions and 1 deletions
31
Makefile
31
Makefile
|
@ -1,3 +1,6 @@
|
|||
CURRENT=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
ROOT:=$(CURRENT)
|
||||
|
||||
PROJECT := arangodb_operator
|
||||
SCRIPTDIR := $(shell pwd)
|
||||
ROOTDIR := $(shell cd $(SCRIPTDIR) && pwd)
|
||||
|
@ -604,4 +607,30 @@ tools: update-vendor
|
|||
.PHONY: vendor
|
||||
vendor:
|
||||
@echo ">> Updating vendor"
|
||||
@go mod vendor
|
||||
@go mod vendor
|
||||
|
||||
set-deployment-api-version-v2alpha1: export API_VERSION=2alpha1
|
||||
set-deployment-api-version-v2alpha1: set-api-version/deployment set-api-version/replication
|
||||
|
||||
set-deployment-api-version-v1: export API_VERSION=1
|
||||
set-deployment-api-version-v1: set-api-version/deployment set-api-version/replication
|
||||
|
||||
set-api-version/%:
|
||||
@grep -rHn "github.com/arangodb/kube-arangodb/pkg/apis/$*/v[A-Za-z0-9]\+" \
|
||||
"$(ROOT)/pkg/deployment/" \
|
||||
"$(ROOT)/pkg/operator/" \
|
||||
"$(ROOT)/pkg/server/" \
|
||||
"$(ROOT)/pkg/util/" \
|
||||
"$(ROOT)/pkg/backup/" \
|
||||
"$(ROOT)/pkg/apis/backup/" \
|
||||
| cut -d ':' -f 1 | sort | uniq \
|
||||
| xargs -n 1 sed -i "s#github.com/arangodb/kube-arangodb/pkg/apis/$*/v[A-Za-z0-9]\+#github.com/arangodb/kube-arangodb/pkg/apis/$*/v$(API_VERSION)#g"
|
||||
@grep -rHn "DatabaseV[A-Za-z0-9]\+()" \
|
||||
"$(ROOT)/pkg/deployment/" \
|
||||
"$(ROOT)/pkg/operator/" \
|
||||
"$(ROOT)/pkg/server/" \
|
||||
"$(ROOT)/pkg/util/" \
|
||||
"$(ROOT)/pkg/backup/" \
|
||||
"$(ROOT)/pkg/apis/backup/" \
|
||||
| cut -d ':' -f 1 | sort | uniq \
|
||||
| xargs -n 1 sed -i "s#DatabaseV[A-Za-z0-9]\+()\.#DatabaseV$(API_VERSION)().#g"
|
Loading…
Reference in a new issue