Skip to content

Commit

Permalink
Merge #515: Convenience scripts for making SHA256SUMS.txt.asc
Browse files Browse the repository at this point in the history
edfbfb3 Update release process docs (Andrew Chow)
043bf82 Add convenience script for making SHA256SUMS.txt (Andrew Chow)
9eebd35 Move built executables to subdirs for shasum'ing (Andrew Chow)

Pull request description:

  These scripts make it easier for me to make the GPG signed sha256sums file. The individual binaries are copied to subdirs named after the tarball or zipfile. Then the `make_shasums.sh` script can make the `SHA256SUMS.txt` file. Lastly, the release process docs are updated to mention this part of the process.

Top commit has no ACKs.

Tree-SHA512: 14ac6487e069013d9f6775fd8912d1e667302038d75ed27d6fdbb8c5c91e8ed134fe373dbd68d66f33c880ea6fc5f77d1ccd06ef5599d057a7f9fefe100585cf
  • Loading branch information
achow101 committed Jun 1, 2021
2 parents d4320d0 + edfbfb3 commit 401e403
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 9 additions & 1 deletion contrib/build_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,13 @@ OS=`uname | tr '[:upper:]' '[:lower:]'`
if [[ $OS == "darwin" ]]; then
OS="mac"
fi
tar -czf "hwi-${VERSION}-${OS}-amd64.tar.gz" hwi hwi-qt
target_tarfile="hwi-${VERSION}-${OS}-amd64.tar.gz"
tar -czf $target_tarfile hwi hwi-qt

# Copy the binaries to subdir for shasum
target_dir="$target_tarfile.dir"
mkdir $target_dir
mv hwi $target_dir
mv hwi-qt $target_dir

popd
10 changes: 9 additions & 1 deletion contrib/build_wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,13 @@ unset PYTHONHASHSEED
# Make the final compressed package
pushd dist
VERSION=`$POETRY run hwi --version | cut -d " " -f 2 | dos2unix`
zip "hwi-${VERSION}-windows-amd64.zip" hwi.exe hwi-qt.exe
target_zipfile="hwi-${VERSION}-windows-amd64.zip"
zip $target_zipfile hwi.exe hwi-qt.exe

# Copy the binaries to subdir for shasum
target_dir="$target_zipfile.dir"
mkdir $target_dir
mv hwi.exe $target_dir
mv hwi-qt.exe $target_dir

popd
14 changes: 14 additions & 0 deletions contrib/make_shasums.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash
# Script for generating the SHA256SUMS.txt file

set -ex

pushd dist

sums=SHA256SUMS.txt
sum_files=`find . -type f -not -name *$sums* | sort`
sha256sum $sum_files > $sums
sed -i 's/\.\///g' $sums
sed -i 's/\.dir//g' $sums

popd
6 changes: 4 additions & 2 deletions docs/development/release-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ Release Process
2. Build distribution archives for PyPi with ``contrib/build_dist.sh``
3. For MacOS and Linux, use ``contrib/build_bin.sh``. This needs to be run on a MacOS machine for the MacOS binary and on a Linux machine for the linux one.
4. For Windows, use ``contrib/build_wine.sh`` to build the Windows binary using wine
5. Upload distribution archives to PyPi
6. Upload distribution archives and standalone binaries to Github
5. Make ``SHA256SUMS.txt`` using ``contrib/make_shasums.sh``.
6. Make ``SHA256SUMS.txt.asc`` using ``gpg --clearsign SHA256SUMS.txt``
7. Upload distribution archives to PyPi
8. Upload distribution archives and standalone binaries to Github

Deterministic builds with Docker
================================
Expand Down

0 comments on commit 401e403

Please sign in to comment.