mmcloughlin / goperf

Continuous Benchmarking for the Go compiler
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

script: ensure dist.sh is reproducible #12

Closed mmcloughlin closed 4 years ago

mmcloughlin commented 4 years ago

With the current terraform-based deployment, it's annoying that the hash of the archive keeps on changing.

mmcloughlin commented 4 years ago
#!/bin/bash -ex

# Prepare Workspace ---------------------------------------------------------

workdir=$(mktemp -d)

# Build Twice ---------------------------------------------------------------

./script/dist.sh ${workdir}/a.tar.gz
./script/dist.sh ${workdir}/b.tar.gz

# Show Hashes ---------------------------------------------------------------

sha256sum ${workdir}/*.tar.gz

# Cleanup Workspace ---------------------------------------------------------

rm -rf ${workdir}