mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
make release: Add a check that version and debian/changelog are consistent
Eventually I'd like to automate this so that one or the other of these files is canonical and the other is generated from it. Until then, add this check to the release process to avoid a skewed release being shipped.
This commit is contained in:
parent
9b065ff3b2
commit
80240877f8
2 changed files with 20 additions and 4 deletions
|
@ -86,7 +86,7 @@ dist: $(TAR_FILE)
|
||||||
# are part of the release and need to take the version from the
|
# are part of the release and need to take the version from the
|
||||||
# version file).
|
# version file).
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: verify-no-dirty-code
|
release: verify-source-tree-and-version
|
||||||
$(MAKE) VERSION=$(VERSION) verify-newer
|
$(MAKE) VERSION=$(VERSION) verify-newer
|
||||||
$(MAKE) VERSION=$(VERSION) test
|
$(MAKE) VERSION=$(VERSION) test
|
||||||
$(MAKE) VERSION=$(VERSION) $(GPG_FILE)
|
$(MAKE) VERSION=$(VERSION) $(GPG_FILE)
|
||||||
|
@ -130,8 +130,14 @@ release-message:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "For more about notmuch, see http://notmuchmail.org"
|
@echo "For more about notmuch, see http://notmuchmail.org"
|
||||||
|
|
||||||
|
# This is a chain of dependencies rather than a simple list simply to
|
||||||
|
# avoid the messages getting interleaved in the case of a parallel
|
||||||
|
# make invocation.
|
||||||
|
.PHONY: verify-source-tree-and-version
|
||||||
|
verify-source-tree-and-version: verify-no-dirty-code
|
||||||
|
|
||||||
.PHONY: verify-no-dirty-code
|
.PHONY: verify-no-dirty-code
|
||||||
verify-no-dirty-code: verify-version
|
verify-no-dirty-code: verify-version-debian
|
||||||
ifeq ($(IS_GIT),yes)
|
ifeq ($(IS_GIT),yes)
|
||||||
@printf "Checking that source tree is clean..."
|
@printf "Checking that source tree is clean..."
|
||||||
ifneq ($(shell git ls-files -m),)
|
ifneq ($(shell git ls-files -m),)
|
||||||
|
@ -148,8 +154,17 @@ else
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: verify-version
|
.PHONY: verify-version-debian
|
||||||
verify-version:
|
verify-version-debian: verify-version-components
|
||||||
|
@echo -n "Checking that Debian package version is $(VERSION)..."
|
||||||
|
@if [ "$(VERSION)" != $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] ; then \
|
||||||
|
(echo "No." && \
|
||||||
|
echo "Please edit version and debian/changelog to have consistent versions." && false) \
|
||||||
|
fi
|
||||||
|
@echo "Good."
|
||||||
|
|
||||||
|
.PHONY: verify-version-components
|
||||||
|
verify-version-components:
|
||||||
@echo -n "Checking that $(VERSION) consists only of digits and periods..."
|
@echo -n "Checking that $(VERSION) consists only of digits and periods..."
|
||||||
@if echo $(VERSION) | grep -q -v -x '[0-9.]*'; then \
|
@if echo $(VERSION) | grep -q -v -x '[0-9.]*'; then \
|
||||||
(echo "No." && \
|
(echo "No." && \
|
||||||
|
|
|
@ -72,6 +72,7 @@ repository. From here, there are just a few steps to release:
|
||||||
5) Run "make release" which will perform the following steps:
|
5) Run "make release" which will perform the following steps:
|
||||||
|
|
||||||
* Ensure that the version consists only of digits and periods
|
* Ensure that the version consists only of digits and periods
|
||||||
|
* Ensure that version and debian/changelog have the same version
|
||||||
* Verify that the source tree is clean
|
* Verify that the source tree is clean
|
||||||
* Compile the current notmuch code (aborting release if it fails)
|
* Compile the current notmuch code (aborting release if it fails)
|
||||||
* Run the notmuch test suite (aborting release if it fails)
|
* Run the notmuch test suite (aborting release if it fails)
|
||||||
|
|
Loading…
Reference in a new issue