diff --git a/ci/build-and-publish-deb b/ci/build-and-publish-deb index 89bf8107..bc3ab748 100755 --- a/ci/build-and-publish-deb +++ b/ci/build-and-publish-deb @@ -1,8 +1,5 @@ #!/bin/bash -set -e -D="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" - # This script builds a binary dpkg for Debian based distros. It does not # currently run in CI, and is instead run manually and the resulting dpkg is # uploaded to GitHub at the end of this script. @@ -11,6 +8,12 @@ D="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" # 'cargo install cargo-deb'. # # This should be run from the root of the ripgrep repo. +# +# TODO: It looks like this script could be pretty easily ported into GitHub +# Actions? + +set -e +D="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" if ! command -V cargo-deb > /dev/null 2>&1; then echo "cargo-deb command missing" >&2 diff --git a/ci/build-and-publish-m2 b/ci/build-and-publish-m2 index 5980337a..fa66a504 100755 --- a/ci/build-and-publish-m2 +++ b/ci/build-and-publish-m2 @@ -1,5 +1,13 @@ #!/bin/bash +# This script builds a ripgrep release for the aarch64-apple-darwin target. +# At time of writing (2023-11-21), GitHub Actions does not free Apple silicon +# runners. Since I have somewhat recently acquired an M2 mac mini, I just use +# this script to build the release tarball and upload it with `gh`. +# +# Once GitHub Actions has proper support for Apple silicon, we should add it +# to our release workflow and drop this script. + set -e version="$1" @@ -13,13 +21,14 @@ if ! grep -q "version = \"$version\"" Cargo.toml; then exit 1 fi -cargo build --release --features pcre2 -BIN=target/release/rg -NAME=ripgrep-$version-aarch64-apple-darwin +target=aarch64-apple-darwin +cargo build --release --features pcre2 --target $target +BIN=target/$target/release/rg +NAME=ripgrep-$version-$target ARCHIVE="deployment/m2/$NAME" mkdir -p "$ARCHIVE"/{complete,doc} -cp target/release/rg "$ARCHIVE"/ +cp "$BIN" "$ARCHIVE"/ strip "$ARCHIVE/rg" cp {README.md,COPYING,UNLICENSE,LICENSE-MIT} "$ARCHIVE"/ cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$ARCHIVE"/doc/