Skip to content

Commit

Permalink
fix: add checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed May 26, 2023
1 parent 163922e commit e5aa120
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/dep_updaters/update-histogram.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ DEPS_DIR="$BASE_DIR/deps"
[ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node"
[ -x "$NODE" ] || NODE=$(command -v node)

# shellcheck disable=SC1091
. "$BASE_DIR/tools/dep_updaters/utils.sh"

NEW_VERSION="$("$NODE" --input-type=module <<'EOF'
const res = await fetch('https://api.github.com/repos/HdrHistogram/HdrHistogram_c/releases/latest');
if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
Expand Down Expand Up @@ -45,6 +48,8 @@ echo "Fetching histogram source archive"

curl -sL -o "$HISTOGRAM_TARBALL" "https://github.com/HdrHistogram/HdrHistogram_c/archive/refs/tags/$HISTOGRAM_TARBALL"

log_and_verify_sha256sum "histogram" "$HISTOGRAM_TARBALL"

gzip -dc "$HISTOGRAM_TARBALL" | tar xf -

rm "$HISTOGRAM_TARBALL"
Expand Down

0 comments on commit e5aa120

Please sign in to comment.