build: release.mk: fix no-release conflict (implied-required version)

Previously, generating custom versioned tarballs without requiring
a "release" (which comprises also tagging hence in turn making the
implied version match the required one as desired) would not allow
to test the release routines thoroughly incl. GPG signing.
Unfortunately, allowing for a temporary tag is prone to accidentally
slipping it to the distributed tree, so that should rather be avoided.
Now it can.

Another step to blur the boundaries between whether "release" is
specified or not is make checksums file generated unconditionally.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
This commit is contained in:
Jan Pokorný 2017-06-09 20:22:49 +02:00
parent 69fe0c3f16
commit ae5138d3e0
No known key found for this signature in database
GPG Key ID: 61BBB23A9E8F8DE2

View File

@ -30,7 +30,9 @@ tag: setup ./tag-$(version)
tag-$(version):
ifeq (,$(release))
@echo Building test release $(version), no tagging
echo '$(version)' > .tarball-version
else
# following will be captured by git-version-gen automatically
git tag -a -m "v$(version) release" v$(version) HEAD
@touch $@
endif
@ -46,12 +48,8 @@ sha256: $(project)-$(version).sha256
$(deliverables): tarballs
$(project)-$(version).sha256:
ifeq (,$(release))
@echo Building test release $(version), no sha256
else
# checksum anything from deliverables except for in-prep checksums file
sha256sum $(deliverables:$@=) | sort -k2 > $@
endif
sign: $(deliverables:=.asc)
@ -81,4 +79,4 @@ else
endif
clean:
rm -rf $(project)-* tag-*
rm -rf $(project)-* tag-* .tarball-version