diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2020-12-11 20:34:07 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2020-12-11 20:51:12 +0100 |
commit | 765a8c2f7cac073b3b70277160639f8df3acb8ef (patch) | |
tree | 6efe6ae7a4564296ab41830f04a17df6e932ab3d | |
parent | 9c192cc8946800535be678644314ec38f6e48ec7 (diff) |
`make release`: also bump libinterimap version and pin it in 'use' declarations.
Also, make use the tag doesn't exist, and fail early if we can't detect
the version.
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | Makefile | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -10,6 +10,8 @@ interimap (0.5.5) upstream; protocol black/whilelist greatly; this only allows simple min/max bounds, but holes are arguably not very useful here. Using the new settings bumps the required libssl version to 1.1.0. + + `make release`: also bump libinterimap version and pin it in 'use' + declarations. - libinterimap: make $OPENSSL_VERSION global. - libinterimap: use Net::SSLeay::get_version() to get the protocol version string. @@ -20,16 +20,21 @@ test: ./tests/run-all release: - @if ! git diff HEAD --quiet -- ./interimap ./pullimap ./Changelog; then \ + @if ! git diff HEAD --quiet -- ./Changelog ./interimap ./pullimap ./lib/Net/IMAP/InterIMAP.pm; 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';/" \ + if git rev-parse -q --verify "refs/tags/v$$VERS" >/dev/null; then echo "tag exists" 2>/dev/null; exit 1; fi && \ + sed -ri "0,/^( -- .*) .*/ s//\\1 $(shell date -R)/" ./Changelog && \ + sed -ri "0,/^(our\\s+\\\$$VERSION\\s*=\\s*)'[0-9.]+'\\s*;/ s//\\1'$$VERS';/" \ + -- ./interimap ./pullimap && \ + sed -ri "0,/^(package\\s+Net::IMAP::InterIMAP\\s+)v[0-9.]+\\s*;/ s//\\1v$$VERS;/" \ + -- ./lib/Net/IMAP/InterIMAP.pm && \ + sed -ri "0,/^(use\\s+Net::IMAP::InterIMAP\\s+)[0-9.]+(\\s|\\$$)/ s//\\1$$VERS\\2/" \ -- ./interimap ./pullimap && \ git commit -m "Prepare new release v$$VERS." \ - -- ./interimap ./pullimap ./Changelog && \ + -- ./Changelog ./interimap ./pullimap ./lib/Net/IMAP/InterIMAP.pm && \ 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" |