aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-12-10 22:27:59 +0100
committerGuilhem Moulin <guilhem@fripost.org>2020-12-11 11:20:41 +0100
commit528bf74289c01bcd2b8a8e7e9a99eba41039b09b (patch)
treedf0ccc81e979b3e53e18b1e68e95d6e9e62b1c26
parent4ed6f0982cc0553e31e7beadf441beb8573a07d4 (diff)
Makefile: new 'release' target.
Also, change the tag format from upstream/$VERSION to v$VERSION.
-rw-r--r--Changelog2
-rw-r--r--Makefile15
2 files changed, 16 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index 87ce9fd..36b0e73 100644
--- a/Changelog
+++ b/Changelog
@@ -17,6 +17,8 @@ interimap (0.5.4) upstream;
+ libinterimap: factor out hostname/IP parsing.
+ document that enclosing 'host' value in square brackets forces its
interpretation as an IP literal (hence skips name resolution).
+ + Makefile: new 'release' target; also, change the tag format from
+ upstream/$VERSION to v$VERSION.
- documentation: replace example.org with example.net for consistency.
-- Guilhem Moulin <guilhem@fripost.org> Thu, 10 Dec 2020 14:22:05 +0100
diff --git a/Makefile b/Makefile
index b85cddd..ff62bf1 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,19 @@ test:
./tests/certs/generate
./tests/run-all
+release:
+ @if ! git diff HEAD --quiet -- ./interimap ./pullimap ./Changelog; then \
+ echo "Dirty state, refusing to release!" >&2; \
+ exit 1; \
+ fi
+ sed -ri "0,/^( -- .*) .*/ s//\1 $(shell date -R)/" ./Changelog
+ VERS=$$(dpkg-parsechangelog -l Changelog -SVersion 2>/dev/null) && \
+ sed -ri "0,/^(our \\\$$VERSION\\s*=\s*)'[0-9.]+'\\s*;/ s//\1'$$VERS';/" \
+ -- ./interimap ./pullimap && \
+ git commit -m "Prepare new release v$$VERS." \
+ -- ./interimap ./pullimap ./Changelog && \
+ git tag -sm "Release version $$VERS" "v$$VERS"
+
## make html CSS="https://guilhem.org/static/css/bootstrap.min.css" BUILD_DOCDIR="$XDG_RUNTIME_DIR/Downloads"
$(HTML_FILES): $(BUILD_DOCDIR)/%.html: ./doc/%.md $(HTML_TEMPLATE)
mtime="$$(git --no-pager log -1 --pretty="format:%ct" -- "$<" 2>/dev/null)"; \
@@ -59,4 +72,4 @@ uninstall:
clean:
rm -vf -- $(MANUAL_FILES) $(HTML_FILES)
-.PHONY: all manual html doc test install uninstall clean
+.PHONY: all manual html doc test release install uninstall clean