From ff980962088753ef2fc53b3a3acdf9efe094fd48 Mon Sep 17 00:00:00 2001 From: Serge Smertin <259697+nfx@users.noreply.github.com> Date: Tue, 18 Jul 2023 17:48:35 +0200 Subject: [PATCH] Integrate with auto-release infra (#581) ## Changes - added changelog template - added `toolchain` to `.codegen.json` ## Tests none --- .codegen.json | 3 +++ .codegen/changelog.md.tmpl | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .codegen/changelog.md.tmpl diff --git a/.codegen.json b/.codegen.json index cd1fa12e..da4f3dd6 100644 --- a/.codegen.json +++ b/.codegen.json @@ -6,5 +6,8 @@ "batch": { ".codegen/cmds-workspace.go.tmpl": "cmd/workspace/cmd.go", ".codegen/cmds-account.go.tmpl": "cmd/account/cmd.go" + }, + "toolchain": { + "required": ["go"] } } diff --git a/.codegen/changelog.md.tmpl b/.codegen/changelog.md.tmpl new file mode 100644 index 00000000..83f1b771 --- /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" -}} + `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 + {{- end}} +{{- end -}}