From 4ae4099c80d5445b684740ecee931f3d700afe0c Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 2 Mar 2020 22:05:37 +0100 Subject: [PATCH] Fix Changelog template --- .drone.star | 4 ++-- Makefile | 2 +- changelog/CHANGELOG.tmpl | 13 ++++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.drone.star b/.drone.star index 91630751c..559fb550f 100644 --- a/.drone.star +++ b/.drone.star @@ -566,7 +566,7 @@ def changelog(ctx): }, { 'name': 'diff', - 'image': 'webhippie/golang:1.13', + 'image': 'owncloud/alpine:latest', 'pull': 'always', 'commands': [ 'git diff', @@ -574,7 +574,7 @@ def changelog(ctx): }, { 'name': 'output', - 'image': 'webhippie/golang:1.13', + 'image': 'owncloud/alpine:latest', 'pull': 'always', 'commands': [ 'cat CHANGELOG.md', diff --git a/Makefile b/Makefile index a8bfd2d57..fd1487c88 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ sync: .PHONY: clean clean: go clean -i ./... - rm -rf $(BIN) $(DIST) + rm -rf $(BIN) $(DIST) $(HUGO) .PHONY: fmt fmt: diff --git a/changelog/CHANGELOG.tmpl b/changelog/CHANGELOG.tmpl index 0c9c645a2..0d11d225c 100644 --- a/changelog/CHANGELOG.tmpl +++ b/changelog/CHANGELOG.tmpl @@ -1,10 +1,10 @@ {{ $allVersions := . }} {{- range $index, $changes := . }}{{ with $changes -}} +{{ if gt (len $allVersions) 1 -}} # Changelog for [{{ .Version }}] ({{ .Date }}) -The following sections list the changes for {{ .Version }}. +The following sections list the changes in ocis-reva {{ .Version }}. -{{ if gt (len $allVersions) 1 -}} {{/* creating version compare links */ -}} {{ $next := add1 $index -}} {{ if ne (len $allVersions) $next -}} @@ -23,16 +23,19 @@ The following sections list the changes for {{ .Version }}. [{{ .Version }}]: https://github.com/owncloud/ocis-reva/compare/6702be7f9045a382d40691a9bcd04f572203e9ed...v{{ .Version }} {{ end -}} -{{- end -}} +{{ else -}} +# Changes in {{ .Version }} + +{{ end -}} ## Summary {{ range $entry := .Entries }}{{ with $entry }} -* {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }}) {{- end }}{{ end }} ## Details {{ range $entry := .Entries }}{{ with $entry }} -* {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }}) {{ range $par := .Paragraphs }} {{ wrapIndent $par 80 3 }} {{ end -}}