From 23b057f46b8d0f0dc5b8e7ac65f2e40cb6cc69e8 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 4 Oct 2017 20:56:28 +0200 Subject: [PATCH] build: add changelogfmt target to format [GH-xxxx] references to links --- .gitignore | 1 + GNUmakefile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b19858143..70c75111b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /pkg Thumbs.db bin/ +changelog.tmp exit-code ui/.bundle ui/.sass-cache diff --git a/GNUmakefile b/GNUmakefile index 4a6dc3a3f..72351df5a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -31,7 +31,7 @@ bin: tools @GOTAGS='$(GOTAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" # dev creates binaries for testing locally - these are put into ./bin and $GOPATH -dev: vendorfmt dev-build +dev: changelogfmt vendorfmt dev-build dev-build: @echo "--> Building consul" @@ -45,6 +45,10 @@ vendorfmt: test -x $(GOPATH)/bin/vendorfmt || go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt vendorfmt +changelogfmt: + @echo "--> Making [GH-xxxx] references clickable..." + @sed -E 's|([^\[])\[GH-([0-9]+)\]|\1[[GH-\2](https://github.com/hashicorp/consul/issues/\2)]|g' CHANGELOG.md > changelog.tmp && mv changelog.tmp CHANGELOG.md + # linux builds a linux package independent of the source platform linux: mkdir -p pkg/linux_amd64/