Skip to content

Commit

Permalink
chore: add release-notes make target
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrombley committed Jun 24, 2020
1 parent 26fff2d commit 4cb8ec1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ clean: cover-clean compile-clean release-clean
# Import fragments
include build/compile.mk
include build/deps.mk
include build/document.mk
include build/lint.mk
include build/release.mk
include build/terraform.mk
Expand Down
32 changes: 32 additions & 0 deletions build/document.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Makefile fragment for displaying auto-generated documentation
#

GOTOOLS += golang.org/x/tools/cmd/godoc \
github.com/git-chglog/git-chglog/cmd/git-chglog
GODOC ?= godoc
GODOC_HTTP ?= "localhost:6060"

CHANGELOG_CMD ?= git-chglog
CHANGELOG_FILE ?= CHANGELOG.md
RELEASE_NOTES_FILE ?= relnotes.md

changelog: tools
@echo "=== $(PROJECT_NAME) === [ changelog ]: Generating changelog..."
@$(CHANGELOG_CMD) --silent -o $(CHANGELOG_FILE)

docs: tools
@echo "=== $(PROJECT_NAME) === [ docs ]: Starting godoc server..."
@echo "=== $(PROJECT_NAME) === [ docs ]:"
@echo "=== $(PROJECT_NAME) === [ docs ]: NOTE: This only works if this codebase is in your GOPATH!"
@echo "=== $(PROJECT_NAME) === [ docs ]: godoc issue: https://github.com/golang/go/issues/26827"
@echo "=== $(PROJECT_NAME) === [ docs ]:"
@echo "=== $(PROJECT_NAME) === [ docs ]: Module Docs: http://$(GODOC_HTTP)/pkg/$(PROJECT_MODULE)"
@$(GODOC) -http=$(GODOC_HTTP)

release-notes: tools
@echo "=== $(PROJECT_NAME) === [ release-notes ]: Generating release notes..."
@mkdir -p $(SRCDIR)/tmp
@$(CHANGELOG_CMD) --silent -o $(SRCDIR)/tmp/$(RELEASE_NOTES_FILE) v$(PROJECT_VER_TAGGED)

.PHONY: docs changelog release-notes

0 comments on commit 4cb8ec1

Please sign in to comment.