Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: document & improve release process #215

Merged
merged 9 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Docker.autogen
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN apt-get update && \
automake \
gettext \
libtool \
gawk \
pkg-config
VOLUME /workdir
ENTRYPOINT cd /workdir && /bin/sh autogen.sh && ./configure -C && make distclean
29 changes: 23 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -194,25 +194,41 @@ EXTRA_DIST = \
.travis.yml

EXTENSIONS = gz bz2 lz lzma xz tarZ shar zip
HASHES = sha1 sha256 sha512
HASHES = sha256 sha512

# Generate clearsigned checksum files.
# Generate detached signatures of the tarballs.
sign:
$(AM_V_GEN)for e in $(EXTENSIONS); do \
if [ -f radvd-$(VERSION).tar.$$e ]; then \
gpg --armor --sign --detach-sign radvd-$(VERSION).tar.$$e; \
for h in $(HASHES); do \
$${h}sum radvd-$(VERSION).tar.$$e > radvd-$(VERSION).tar.$$e.$$h; \
$${h}sum --tag radvd-$(VERSION).tar.$$e > radvd-$(VERSION).tar.$$e.$$h || exit 1; \
gpg --clear-sign radvd-$(VERSION).tar.$$e.$$h || exit 1; \
mv -f radvd-$(VERSION).tar.$$e.$$h.asc radvd-$(VERSION).tar.$$e.$$h || exit 1; \
done; \
gpg -sba radvd-$(VERSION).tar.$$e; \
fi; \
done

# Verify clearsigned checksum files.
# Verify detached signatures of the tarballs.
#
# Be careful to verify the clearsign, take ONLY the signed part, and then
# verify the checksum contained in that (ignore checksums OUTSIDE the
# clearsigned part).
verify:
$(AM_V_GEN)for e in $(EXTENSIONS); do \
if [ -f radvd-$(VERSION).tar.$$e ]; then \
gpg --verify radvd-$(VERSION).tar.$$e.asc; \
for h in $(HASHES); do \
$${h}sum -c radvd-$(VERSION).tar.$$e.$$h; \
rm -f radvd-$(VERSION).tar.$$e.$$h.verified || exit 1; \
gpg --output radvd-$(VERSION).tar.$$e.$$h.verified --verify radvd-$(VERSION).tar.$$e.$$h || exit 1; \
if ! $${h}sum -c radvd-$(VERSION).tar.$$e.$$h.verified ; then \
rm -f radvd-$(VERSION).tar.$$e.$$h.verified; \
exit 1; \
fi; \
rm -f radvd-$(VERSION).tar.$$e.$$h.verified; \
done; \
gpg --verify radvd-$(VERSION).tar.$$e.asc; \
fi; \
done

Expand All @@ -233,6 +249,8 @@ html:

packages:
@if [[ "$$(git diff | wc -l)" != "0" ]] ; then printf "\n\n\tYou have local changes in the working copy...\n\n\n" && git diff && false ; fi
@if [[ "$$(git rev-parse HEAD)" != "$$(git rev-parse v$(VERSION)^{commit})" ]] ; then printf "\n\n\tv$(VERSION) tag missing, or not checked out...\n\n\n" && false ; fi
rm -f radvd-$(VERSION).tar*
$(MAKE) dist-gzip
rm -rf radvd-$(VERSION)
tar zfx radvd-$(VERSION).tar.gz
Expand All @@ -242,7 +260,6 @@ packages:
$(MAKE) sign
$(MAKE) verify
$(MAKE) html
@if [[ "$$(git rev-parse HEAD)" != "$$(git rev-parse v$(VERSION))" ]] ; then printf "\n\n\tv$(VERSION) tag missing, or not checked out...\n\n\n" && false ; fi
@printf "\n\n\tDont forget to push the v$(VERSION) tag and this branch to origin (git push origin v$(VERSION) master)\n\n\n"


Expand Down
16 changes: 16 additions & 0 deletions RELEASE-PROCESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Rough release process

0. Update `CHANGES` & commit!
1. `export VERSION=2...`
2. `sed -i -e "/^AC_INIT/s,\[.*\],[$VERSION],g" configure.ac`
3. `git commit -s -m "Release ${VERSION}" configure.ac`
4. `git tag -s v${VERSION} -m "$VERSION"`
5. `docker rmi radvd-autogen:latest`
6. `./autogen-container.sh`
7. `./configure`
8. `make packages`
9. `gh release create v${VERSION} radvd-${VERSION}.tar.{xz,gz}{,.asc,.sha256,.sha512}`


## Tools
https://cli.github.com/
Loading