mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-10-06 05:36:58 +02:00
release: build aarch64 artifacts for macos on GitHub Actions
GitHub now supports this natively, so there's no need for me to do it any more. Fixes #3155
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -114,6 +114,10 @@ jobs:
|
||||
os: macos-latest
|
||||
rust: nightly
|
||||
target: x86_64-apple-darwin
|
||||
- build: macos
|
||||
os: macos-latest
|
||||
rust: nightly
|
||||
target: aarch64-apple-darwin
|
||||
- build: win-msvc
|
||||
os: windows-latest
|
||||
rust: nightly
|
||||
|
@@ -33,6 +33,8 @@ Bug fixes:
|
||||
Fix a bug where `-q --files-without-match` inverted the exit code.
|
||||
* [BUG #3140](https://github.com/BurntSushi/ripgrep/issues/3140):
|
||||
Ensure hyphens in flag names are escaped in the roff text for the man page.
|
||||
* [BUG #3155](https://github.com/BurntSushi/ripgrep/issues/3155):
|
||||
Statically compile PCRE2 into macOS release artifacts on `aarch64`.
|
||||
|
||||
Feature enhancements:
|
||||
|
||||
|
@@ -41,8 +41,6 @@
|
||||
> tool that recursively searches the current directory for a regex pattern.
|
||||
> By default, ripgrep will respect gitignore rules and automatically skip
|
||||
> hidden files/directories and binary files.
|
||||
* Run `git checkout {VERSION} && ci/build-and-publish-m2 {VERSION}` on a macOS
|
||||
system with Apple silicon.
|
||||
* Run `cargo publish`.
|
||||
* Run `ci/sha256-releases {VERSION} >> pkg/brew/ripgrep-bin.rb`. Then edit
|
||||
`pkg/brew/ripgrep-bin.rb` to update the version number and sha256 hashes.
|
||||
|
@@ -1,43 +0,0 @@
|
||||
#!/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"
|
||||
if [ -z "$version" ]; then
|
||||
echo "missing version" >&2
|
||||
echo "Usage: "$(basename "$0")" <version>" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -q "version = \"$version\"" Cargo.toml; then
|
||||
echo "version does not match Cargo.toml" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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 "$BIN" "$ARCHIVE"/
|
||||
strip "$ARCHIVE/rg"
|
||||
cp {README.md,COPYING,UNLICENSE,LICENSE-MIT} "$ARCHIVE"/
|
||||
cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$ARCHIVE"/doc/
|
||||
"$BIN" --generate complete-bash > "$ARCHIVE/complete/rg.bash"
|
||||
"$BIN" --generate complete-fish > "$ARCHIVE/complete/rg.fish"
|
||||
"$BIN" --generate complete-powershell > "$ARCHIVE/complete/_rg.ps1"
|
||||
"$BIN" --generate complete-zsh > "$ARCHIVE/complete/_rg"
|
||||
"$BIN" --generate man > "$ARCHIVE/doc/rg.1"
|
||||
|
||||
tar c -C deployment/m2 -z -f "$ARCHIVE.tar.gz" "$NAME"
|
||||
shasum -a 256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
|
||||
gh release upload "$version" "$ARCHIVE.tar.gz" "$ARCHIVE.tar.gz.sha256"
|
Reference in New Issue
Block a user