diff --git a/README-NEW.md b/README-NEW.md index 3e8225cd..e2a1fca5 100644 --- a/README-NEW.md +++ b/README-NEW.md @@ -104,7 +104,7 @@ If you're a `brew` user, then you can install it with a custom formula directly): ``` -$ brew install https://github.com/BurntSushi/ripgrep/blob/master/pkg/brew/ripgrep.rb +$ brew install https://raw.githubusercontent.com/BurntSushi/ripgrep/master/pkg/brew/ripgrep.rb ``` If you're a Rust programmer, `ripgrep` can be installed with `cargo`: diff --git a/ci/sha256.sh b/ci/sha256.sh new file mode 100644 index 00000000..927c2e0f --- /dev/null +++ b/ci/sha256.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ $# != 1 ]; then + echo "Usage: $(basename $0) version" >&2 + exit 1 +fi +version="$1" + +for arch in i686 x86_64; do + for target in apple-darwin unknown-linux-musl; do + url="https://github.com/BurntSushi/ripgrep/releases/download/$version/ripgrep-$version-$arch-$target.tar.gz" + sha=$(curl -L -s "$url" | sha256sum) + echo $version-$arch-$target $sha + done +done diff --git a/pkg/brew/ripgrep.rb b/pkg/brew/ripgrep.rb index c3c45095..61748e3b 100644 --- a/pkg/brew/ripgrep.rb +++ b/pkg/brew/ripgrep.rb @@ -6,8 +6,10 @@ class Ripgrep < Formula if Hardware::CPU.is_64_bit? url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz" + sha256 "893e0e7fac88ebbef024829466fafef6eae5b1060273bbfca3806090e660b06b" else url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-i686-apple-darwin.tar.gz" + sha256 "2296c8081a2bfe28b43dea4326a9e8ce9c2821fd628a1ca366e824aceddc5fad" end def install