Skip to content

Commit

Permalink
Create signchecksum script (#396)
Browse files Browse the repository at this point in the history
Resolves #393
  • Loading branch information
lukechilds authored and sindresorhus committed Jul 2, 2018
1 parent f0edacf commit a2f2ec6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ $ yarn release
```

Then edit the automatically created GitHub Releases draft and publish.

Once the release is published you can automatically generate a signed checksum file with:

```
$ ./signedchecksum
```

It will create a file called `SHASUMS256.txt.asc` that you need to upload to the GitHub release manually.
17 changes: 17 additions & 0 deletions signedchecksum
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

run_dir=$(pwd)
cd $(mktemp -d)

echo "Downloading build artefacts to temporary directory:"
pwd

curl https://api.github.com/repos/hyperdexapp/hyperdex/releases/latest | jq '.assets[].browser_download_url' | xargs wget

echo "Calculating checksums and signing the result..."

export GPG_TTY=$(tty)
shasum --algorithmn 256 * | gpg --clearsign > "$run_dir/SHASUMS256.txt.asc"

echo "Created SHASUM256.txt.asc"

0 comments on commit a2f2ec6

Please sign in to comment.