Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix homebrew publish script #5044

Merged
merged 6 commits into from
Jan 24, 2023
Merged
Changes from 2 commits
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
13 changes: 11 additions & 2 deletions dev/release/publish_homebrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

set -ue

if [ "$#" -ne 3 ]; then
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <version> <github-user> <github-token> <homebrew-default-branch-name>"
exit 1
fi
Expand All @@ -30,6 +30,15 @@ github_token=$3
# Prepare for possible renaming of the default branch on Homebrew
homebrew_default_branch_name=$4

# Git parallel fetch
if sysctl -n hw.ncpu 2>/dev/null; then # macOS
num_processing_units=$(sysctl -n hw.ncpu)
elif [ -x "$(command -v nproc)" ]; then # Linux
num_processing_units=$(nproc)
else # Fallback
num_processing_units=1
fi

url="https://www.apache.org/dyn/closer.lua?path=arrow/arrow-datafusion-${version}/apache-arrow-datafusion-${version}.tar.gz"
sha256="$(curl https://dist.apache.org/repos/dist/release/arrow/arrow-datafusion-${version}/apache-arrow-datafusion-${version}.tar.gz.sha256 | cut -d' ' -f1)"

Expand All @@ -41,7 +50,7 @@ if ! git remote | grep -q --fixed-strings ${github_user}; then
fi

echo "Updating working copy"
git fetch --all --prune --tags --force -j$(nproc)
git fetch --all --prune --tags --force -j$(num_processing_units)

branch=apache-arrow-datafusion-${version}
echo "Creating branch: ${branch}"
Expand Down