diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -54,6 +54,20 @@ $(BUILDDIR)/%: % s#@@lacme_client_group@@#$(lacme_client_group)#g;" \ -- "$@" +release: + @if ! git diff HEAD --quiet -- ./Changelog ./lacme ./lacme-accountd; then \ + echo "Dirty state, refusing to release!" >&2; \ + exit 1; \ + fi + VERS=$$(dpkg-parsechangelog -l Changelog -SVersion 2>/dev/null) && \ + 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';/" \ + -- ./lacme ./lacme-accountd && \ + git commit -m "Prepare new release v$$VERS." \ + -- ./Changelog ./lacme ./lacme-accountd && \ + git tag -sm "Release version $$VERS" "v$$VERS" + install: all install -m0644 -vDt $(sysconfdir)/lacme $(BUILDDIR)/config/*.conf $(BUILDDIR)/snippets/*.conf install -vd $(sysconfdir)/lacme/lacme-certs.conf.d @@ -72,4 +86,4 @@ uninstall: clean: rm -rvf -- $(BUILDDIR) -.PHONY: all doc manual install uninstall clean +.PHONY: all doc manual release install uninstall clean |