From 6f7f3d070690963bcfa277d41443cea41dbe1109 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Wed, 7 Aug 2024 17:14:59 +0200 Subject: [PATCH] Add a make target to create a changelog in csv format --- Makefile | 5 +++++ changelog/changelog-csv.tmpl | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 changelog/changelog-csv.tmpl diff --git a/Makefile b/Makefile index 23467a7444..6a8e1d6bf5 100644 --- a/Makefile +++ b/Makefile @@ -290,6 +290,11 @@ endif mkdir -p ocis/dist $(CALENS) --version $(CHANGELOG_VERSION) -o ocis/dist/CHANGELOG.md +.PHONY: changelog-csv +changelog-csv: $(CALENS) + mkdir -p ocis/dist + $(CALENS) -t changelog/changelog-csv.tmpl -o ocis/dist/changelog.csv + .PHONY: govulncheck govulncheck: $(GOVULNCHECK) $(GOVULNCHECK) ./... diff --git a/changelog/changelog-csv.tmpl b/changelog/changelog-csv.tmpl new file mode 100644 index 0000000000..425c9fe87d --- /dev/null +++ b/changelog/changelog-csv.tmpl @@ -0,0 +1,8 @@ +## Release, Date, Type, Title, Primary ID, Primary URL +{{ range . -}} +{{ $v := .Version -}} +{{ $d := .Date -}} +{{ range $entry := .Entries -}} +{{ $v }},{{ $d }},{{ .Type }},'{{ .Title }}',{{ .PrimaryID }},{{ .PrimaryURL }} +{{ end -}} +{{ end -}}