From 6149a3ed132353eb8d98e0b76ad867f39e308392 Mon Sep 17 00:00:00 2001 From: Adam Janikowski <12255597+ajanikow@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:41:19 +0100 Subject: [PATCH] [Bugfix] Fix V2Alpha1 Generator (#1169) --- CHANGELOG.md | 1 + Makefile | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e27c23e31..9c22a6738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - (Bugfix) Fix PDBs Version discovery - (Feature) Agency ArangoSync State check - (Improvement) Parametrize Make tools +- (Bugfix) Fix V2Alpha1 Generator ## [1.2.20](https://github.com/arangodb/kube-arangodb/tree/1.2.20) (2022-10-25) - (Feature) Add action progress diff --git a/Makefile b/Makefile index cce8f3a27..0dc890ec7 100644 --- a/Makefile +++ b/Makefile @@ -516,10 +516,24 @@ vendor: @go mod vendor -e 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-v2alpha1: set-api-version/deployment set-typed-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-deployment-api-version-v1: set-api-version/deployment set-typed-api-version/deployment set-api-version/replication + +set-typed-api-version/%: + @grep -rHn "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/$*/v[A-Za-z0-9]\+" \ + "$(ROOT)/pkg/deployment/" \ + "$(ROOT)/pkg/replication/" \ + "$(ROOT)/pkg/operator/" \ + "$(ROOT)/pkg/server/" \ + "$(ROOT)/pkg/util/" \ + "$(ROOT)/pkg/handlers/" \ + "$(ROOT)/pkg/apis/backup/" \ + "$(ROOT)/pkg/upgrade/" \ + | cut -d ':' -f 1 | sort | uniq \ + | xargs -n 1 $(SED) -i "s#github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/$*/v[A-Za-z0-9]\+#github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/$*/v$(API_VERSION)#g" + set-api-version/%: @grep -rHn "github.com/arangodb/kube-arangodb/pkg/apis/$*/v[A-Za-z0-9]\+" \