Skip to content

Instantly share code, notes, and snippets.

@oliverlee
Created June 17, 2025 05:07
Show Gist options
  • Save oliverlee/094984215ed1a1270dff211a60630728 to your computer and use it in GitHub Desktop.
Save oliverlee/094984215ed1a1270dff211a60630728 to your computer and use it in GitHub Desktop.
generate the integrity for a bazel archive
#!/bin/bash
set -euo pipefail
# https://github.com/bazelbuild/bazel/issues/17124
url="$1"
echo -n "sha256-"
curl -fnsSL "$url" | sha256sum | cut -d' ' -f1 | xxd -r -p | base64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment