diff options
author | Valentin Rothberg <vrothberg@suse.com> | 2018-03-17 15:52:54 +0100 |
---|---|---|
committer | Valentin Rothberg <vrothberg@suse.com> | 2018-03-21 13:44:35 +0100 |
commit | 9416e2d78451f45a987c310bf5c061a8d316630a (patch) | |
tree | dad68a5de2926c0b6734fc88337596cada19488a | |
parent | 38a1b2f16d210525eafcc845e7a9cce598207113 (diff) | |
download | podman-9416e2d78451f45a987c310bf5c061a8d316630a.tar.gz podman-9416e2d78451f45a987c310bf5c061a8d316630a.tar.bz2 podman-9416e2d78451f45a987c310bf5c061a8d316630a.zip |
Makefile: add changelog target
Maintaining a changelog for each new version or release of Podman helps
users to quickly skim for new changes. Add a `make changelog` target to
facilitate creating a new log.
There are two env variables to control the base and target commit for
the new log. The output gets prepended to the changelog.txt file, which
is a textfile in following format:
- Changelog for $(CHANGELOG_TARGET) (ISO-8601 DATE):
* Commit subject
* Commit subject...
Notice that the list of commit subjects excludes merge commits, and can
be manually modified after generation if needed.
`CHANGELOG_BASE=v0.3.2 CHANGELOG_TARGET=v0.3.3 make changelog` would
generate the following shortened output to the changelog.txt file:
Changelog for v0.3.3 (2018-03-17):
* Bump to v0.3.3
* Fix build after c/image changes
* Update containers/image
* Fix E2E tests
* Address review comments
* Fix E2E tests
* Add restart to main podman manpage
* Add podman restart to podman bash completions and commands
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | changelog.txt | 0 |
2 files changed, 15 insertions, 1 deletions
@@ -1,6 +1,8 @@ GO ?= go EPOCH_TEST_COMMIT ?= c08a1e0b11 HEAD ?= HEAD +CHANGELOG_BASE ?= HEAD~ +CHANGELOG_TARGET ?= HEAD PROJECT := github.com/projectatomic/libpod GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") @@ -24,6 +26,7 @@ PACKAGES ?= $(shell go list -tags "${BUILDTAGS}" ./... | grep -v github.com/proj COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) GIT_COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") BUILD_INFO := $(shell date +%s) +ISODATE := $(shell date --iso-8601) # If GOPATH not specified, use one in the local directory ifeq ($(GOPATH),) @@ -150,6 +153,16 @@ docs: $(MANPAGES) docker-docs: docs (cd docs; ./dckrman.sh *.1) +changelog: + @echo "Creating changelog from $(CHANGELOG_BASE) to $(CHANGELOG_TARGET)" + $(eval TMPFILE := $(shell mktemp)) + $(shell cat changelog.txt > $(TMPFILE)) + $(shell echo "- Changelog for $(CHANGELOG_TARGET) ($(ISODATE)):" > changelog.txt) + $(shell git log --no-merges --format=" * %s" $(CHANGELOG_BASE)..$(CHANGELOG_TARGET) >> changelog.txt) + $(shell echo "" >> changelog.txt) + $(shell cat $(TMPFILE) >> changelog.txt) + $(shell rm $(TMPFILE)) + install: .gopathok install.bin install.man install.cni install.bin: @@ -227,4 +240,5 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man lint \ pause \ uninstall \ - shell + shell \ + changelog diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/changelog.txt |