* [PATCH] make release: verify-version-*: change comparison logic
@ 2011-11-21 15:55 Tomi Ollila
2011-11-21 16:27 ` [PATCH] make release: added goal verify-version-manpage Tomi Ollila
2011-11-21 16:34 ` [PATCH] make release: use sed to check debian version Tomi Ollila
0 siblings, 2 replies; 3+ messages in thread
From: Tomi Ollila @ 2011-11-21 15:55 UTC (permalink / raw)
To: notmuch
verfy-version-debian, verify-version-python and verify-version-components
checked noneqality of the comparison strings and if got "positive"
answer then made that goal fail. But in case of the test ([ ])
execution failed it never got to the 'then' part of the line (and
the 'if [ ... ] then ... fi ' construct doesn't make the script line
fail in case of problems inside [ ].
This commit inverses the "logic", so that only if the comparison for
equality succeeds the script line will exit with 0 and execution
can continue past the failure case to the next line (executed by another
shell) with '@echo done'
---
Makefile.local | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/Makefile.local b/Makefile.local
index 775f393..b6e216a 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -207,28 +207,25 @@ endif
.PHONY: verify-version-debian
verify-version-debian: verify-version-components
@echo -n "Checking that Debian package version is $(VERSION)-1..."
- @if [ "$(VERSION)-1" != $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] ; then \
+ @[ "$(VERSION)-1" = $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] || \
(echo "No." && \
- echo "Please edit version and debian/changelog to have consistent versions." && false) \
- fi
+ echo "Please edit version and debian/changelog to have consistent versions." && false)
@echo "Good."
.PHONY: verify-version-python
verify-version-python: verify-version-components
@echo -n "Checking that python bindings version is $(VERSION)..."
- @if [ "$(VERSION)" != $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] ; then \
+ @[ "$(VERSION)" = $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] || \
(echo "No." && \
- echo "Please edit version and $(PV_FILE) to have consistent versions." && false) \
- fi
+ echo "Please edit version and $(PV_FILE) to have consistent versions." && false)
@echo "Good."
.PHONY: verify-version-components
verify-version-components:
@echo -n "Checking that $(VERSION) consists only of digits and periods..."
- @if echo $(VERSION) | grep -q -v -x '[0-9.]*'; then \
+ @echo $(VERSION) | grep -q -x '^[0-9.]*$$' || \
(echo "No." && \
- echo "Please follow the instructions in RELEASING to choose a version" && false) \
- else :; fi
+ echo "Please follow the instructions in RELEASING to choose a version" && false)
@echo "Good."
.PHONY: verify-newer
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] make release: added goal verify-version-manpage
2011-11-21 15:55 [PATCH] make release: verify-version-*: change comparison logic Tomi Ollila
@ 2011-11-21 16:27 ` Tomi Ollila
2011-11-21 16:34 ` [PATCH] make release: use sed to check debian version Tomi Ollila
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2011-11-21 16:27 UTC (permalink / raw)
To: notmuch
Check that the version mentioned in notmuch manual page
is consistent with the version file.
---
Makefile.local | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Makefile.local b/Makefile.local
index b6e216a..02afdd0 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -187,7 +187,7 @@ release-message:
verify-source-tree-and-version: verify-no-dirty-code
.PHONY: verify-no-dirty-code
-verify-no-dirty-code: verify-version-debian verify-version-python
+verify-no-dirty-code: verify-version-debian verify-version-python verify-version-manpage
ifeq ($(IS_GIT),yes)
@printf "Checking that source tree is clean..."
ifneq ($(shell git ls-files -m),)
@@ -220,6 +220,14 @@ verify-version-python: verify-version-components
echo "Please edit version and $(PV_FILE) to have consistent versions." && false)
@echo "Good."
+.PHONY: verify-version-manpage
+verify-version-manpage: verify-version-components
+ @echo -n "Checking that manual page version is $(VERSION)..."
+ @[ "$(VERSION)" = $$(sed -n '/^[.]TH NOTMUCH 1/{s/.*"Notmuch //;s/".*//p;}' notmuch.1) ] || \
+ (echo "No." && \
+ echo "Please edit version and notmuch.1 to have consistent versions." && false)
+ @echo "Good."
+
.PHONY: verify-version-components
verify-version-components:
@echo -n "Checking that $(VERSION) consists only of digits and periods..."
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] make release: use sed to check debian version
2011-11-21 15:55 [PATCH] make release: verify-version-*: change comparison logic Tomi Ollila
2011-11-21 16:27 ` [PATCH] make release: added goal verify-version-manpage Tomi Ollila
@ 2011-11-21 16:34 ` Tomi Ollila
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2011-11-21 16:34 UTC (permalink / raw)
To: notmuch
Use common sed tool instead of dpkg-parsechangelog (which is usually
available on debian systems only) to verify that debian version
information is consistent with version file.
---
Makefile.local | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile.local b/Makefile.local
index 02afdd0..c94402b 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -207,7 +207,7 @@ endif
.PHONY: verify-version-debian
verify-version-debian: verify-version-components
@echo -n "Checking that Debian package version is $(VERSION)-1..."
- @[ "$(VERSION)-1" = $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] || \
+ @[ "$(VERSION)-1" = $$(sed '1{ s/).*//; s/.*(//; q; }' debian/changelog) ] || \
(echo "No." && \
echo "Please edit version and debian/changelog to have consistent versions." && false)
@echo "Good."
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-21 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 15:55 [PATCH] make release: verify-version-*: change comparison logic Tomi Ollila
2011-11-21 16:27 ` [PATCH] make release: added goal verify-version-manpage Tomi Ollila
2011-11-21 16:34 ` [PATCH] make release: use sed to check debian version Tomi Ollila
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).