Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
fix: add checksum
  • Loading branch information
marco-ippolito committed May 29, 2023
commit a7c20ee6855f45e07473f5b688117187ccdc38d3
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