Skip to content

Commit

Permalink
Verify the tagged version is referenced in the CHANGELOG (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps authored Apr 19, 2018
1 parent 33e9f62 commit f14b2a2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
.git/
.gitignore
.github/
LICENSE

*.txt
*.md
*.yml
*.png
*.jpg
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ GOTOOLS = \
github.com/golang/dep/cmd/dep \

GOPACKAGES := $(go list ./... | grep -v /vendor/)
VERSION ?= $(shell git describe --abbrev=0 --tags)
CHANGELOG_VERSION = $(shell perl -ne '/^\#\# (\d+(\.\d+)+) / && print "$$1\n"' CHANGELOG.md | head -n1)

.PHONY: setup
setup: ## Install all the build and lint dependencies
Expand Down Expand Up @@ -46,6 +48,17 @@ build: ## Build a version
clean: ## Remove temporary files
go clean

.PHONY: verify
verify: ## Verify the version is referenced in the CHANGELOG
@if [ "$(VERSION)" = "$(CHANGELOG_VERSION)" ]; then \
echo "version: $(VERSION)"; \
else \
echo "Version number not found in CHANGELOG.md"; \
echo "version: $(VERSION)"; \
echo "CHANGELOG: $(CHANGELOG_VERSION)"; \
exit 1; \
fi

# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help:
Expand Down
17 changes: 11 additions & 6 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
- type: parallel
name: "multi-version tests"
steps:
- service: gov
name: "1.8.6 test"
- name: "1.8.6 test"
service: gov
command: gov 1.8.6 test -v

- service: gov
name: "1.9.4 test"
- name: "1.9.4 test"
service: gov
command: gov 1.9.4 test -v

- name: "tests"
service: test
command: make ci

- service: integration
name: "integration tests"
- name: "integration tests"
service: integration
tag: master
command: make integration

- name: "verify release"
service: test
tag: (\d+(\.\d+)+)
command: make verify

0 comments on commit f14b2a2

Please sign in to comment.