From 6fd99244aaf9cb70d008d1ba69262a1944d4ea74 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:34:39 +0200 Subject: [PATCH 1/8] Integrate with auto-release infra - added changelog template - added `toolchain` to `.codegen.json` --- .codegen.json | 6 ++++++ .codegen/changelog.md.tmpl | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .codegen/changelog.md.tmpl diff --git a/.codegen.json b/.codegen.json index cd1fa12edb..eb1c07e488 100644 --- a/.codegen.json +++ b/.codegen.json @@ -6,5 +6,11 @@ "batch": { ".codegen/cmds-workspace.go.tmpl": "cmd/workspace/cmd.go", ".codegen/cmds-account.go.tmpl": "cmd/account/cmd.go" + }, + "toolchain": { + "required": ["go"], + "post_generate": [ + "go test -short ./..." + ] } } diff --git a/.codegen/changelog.md.tmpl b/.codegen/changelog.md.tmpl new file mode 100644 index 0000000000..5834d46660 --- /dev/null +++ b/.codegen/changelog.md.tmpl @@ -0,0 +1,29 @@ +# Version changelog + +## {{.Version}} + +{{range .Changes -}} + * {{.}}. +{{end}}{{- if .ApiChanges}} +API Changes: +{{range .ApiChanges}}{{if or (eq .X "method") (eq .X "service")}} + * {{.Action}} {{template "what" .}}{{if .Extra}} {{.Extra}}{{with .Other}} {{template "what" .}}{{end}}{{end}}. +{{- end}}{{- end}} + +OpenAPI SHA: {{.Sha}}, Date: {{.Changed}} +{{- end}}{{if .DependencyUpdates}} +Dependency updates: +{{range .DependencyUpdates}} + * {{.}}. +{{- end -}} +{{end}} + +## {{.PrevVersion}} + +{{- define "what" -}} + {{if eq .X "service" -}} + `{{if .Service.IsAccounts}}account {{end}} {{.Service.KebabName}}` command group + {{- else if eq .X "method" -}} + `{{if .Method.Service.IsAccounts}}account {{end}} {{.Service.KebabName}} {{.KebabName}}` command + {{- end}} +{{- end -}} From a5b8b513cc19182cb88a17ddd03b2a8a42563ac3 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:36:14 +0200 Subject: [PATCH 2/8] fix --- .codegen.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.codegen.json b/.codegen.json index eb1c07e488..d1f4486167 100644 --- a/.codegen.json +++ b/.codegen.json @@ -10,6 +10,7 @@ "toolchain": { "required": ["go"], "post_generate": [ + "go mod vendor", "go test -short ./..." ] } From c6f5276d64d095052549ec1c8a96b5aae43f3e5a Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:37:32 +0200 Subject: [PATCH 3/8] fix --- .codegen.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.codegen.json b/.codegen.json index d1f4486167..6d7d2ba5a0 100644 --- a/.codegen.json +++ b/.codegen.json @@ -10,6 +10,7 @@ "toolchain": { "required": ["go"], "post_generate": [ + "go mod tidy", "go mod vendor", "go test -short ./..." ] From 402c40b58f61755a553584cb69202b18d32b9e2e Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:38:39 +0200 Subject: [PATCH 4/8] fix --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 6d7d2ba5a0..c2356b1321 100644 --- a/.codegen.json +++ b/.codegen.json @@ -10,7 +10,7 @@ "toolchain": { "required": ["go"], "post_generate": [ - "go mod tidy", + "rm -fr vendor", "go mod vendor", "go test -short ./..." ] From 0702ce94278136f6a9ba8ed1ad72519d53f3de88 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:39:20 +0200 Subject: [PATCH 5/8] fix --- .codegen.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.codegen.json b/.codegen.json index c2356b1321..c500055534 100644 --- a/.codegen.json +++ b/.codegen.json @@ -11,6 +11,7 @@ "required": ["go"], "post_generate": [ "rm -fr vendor", + "go mod tidy", "go mod vendor", "go test -short ./..." ] From 3a686d73679b0ed74737a1575d492bf5e03493f6 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:40:09 +0200 Subject: [PATCH 6/8] temporarily disable tests --- .codegen.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.codegen.json b/.codegen.json index c500055534..da4f3dd610 100644 --- a/.codegen.json +++ b/.codegen.json @@ -8,12 +8,6 @@ ".codegen/cmds-account.go.tmpl": "cmd/account/cmd.go" }, "toolchain": { - "required": ["go"], - "post_generate": [ - "rm -fr vendor", - "go mod tidy", - "go mod vendor", - "go test -short ./..." - ] + "required": ["go"] } } From b2679e979c4dc8185d7ecbc3f0939cecea245565 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:47:09 +0200 Subject: [PATCH 7/8] fix --- .codegen/changelog.md.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.codegen/changelog.md.tmpl b/.codegen/changelog.md.tmpl index 5834d46660..6dbbda5603 100644 --- a/.codegen/changelog.md.tmpl +++ b/.codegen/changelog.md.tmpl @@ -22,8 +22,8 @@ Dependency updates: {{- define "what" -}} {{if eq .X "service" -}} - `{{if .Service.IsAccounts}}account {{end}} {{.Service.KebabName}}` command group + `databricks {{- if .Service.IsAccounts}}account {{end -}}{{(.Service.TrimPrefix "account").KebabName}}` command group {{- else if eq .X "method" -}} - `{{if .Method.Service.IsAccounts}}account {{end}} {{.Service.KebabName}} {{.KebabName}}` command + `databricks {{- if .Method.Service.IsAccounts}}account {{end -}}{{(.Method.Service.TrimPrefix "account").KebabName}} {{.Method.KebabName}}` command {{- end}} {{- end -}} From c2a4725e371cf848b822285186d8957a37028405 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 17 Jul 2023 20:48:03 +0200 Subject: [PATCH 8/8] fix --- .codegen/changelog.md.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.codegen/changelog.md.tmpl b/.codegen/changelog.md.tmpl index 6dbbda5603..83f1b77120 100644 --- a/.codegen/changelog.md.tmpl +++ b/.codegen/changelog.md.tmpl @@ -22,8 +22,8 @@ Dependency updates: {{- define "what" -}} {{if eq .X "service" -}} - `databricks {{- if .Service.IsAccounts}}account {{end -}}{{(.Service.TrimPrefix "account").KebabName}}` command group + `databricks {{if .Service.IsAccounts}}account {{end -}}{{(.Service.TrimPrefix "account").KebabName}}` command group {{- else if eq .X "method" -}} - `databricks {{- if .Method.Service.IsAccounts}}account {{end -}}{{(.Method.Service.TrimPrefix "account").KebabName}} {{.Method.KebabName}}` command + `databricks {{if .Method.Service.IsAccounts}}account {{end -}}{{(.Method.Service.TrimPrefix "account").KebabName}} {{.Method.KebabName}}` command {{- end}} {{- end -}}