replace official tool named bump-formula-pr

parent 1b8bbf6a
...@@ -29,24 +29,4 @@ if [ -z "$checksum" ]; then ...@@ -29,24 +29,4 @@ if [ -z "$checksum" ]; then
exit 1 exit 1
fi fi
pushd "$(brew --prefix)" brew bump-formula-pr --url=$url --sha256=$checksum $brew_name
git fetch -q --unshallow origin master 2>/dev/null || git fetch -q origin master
branch="${brew_name}-${version}"
git checkout -q -B "$branch" origin/master
formula="Library/Formula/${brew_name}.rb"
sed -i.bak -E "
s!^( url ).+!\\1\"${url}\"!
s!^( sha256 ).+!\\1\"${checksum}\"!
" "$formula"
rm -f "${formula}.bak"
git commit -m "${brew_name} ${version#v}" -- "$formula"
# hackish way of getting the git remote name for user's fork
fork_remote="$(hub fork 2>&1 | grep -oE 'remote:? \S+' | tail -1 | awk '{print $2}')"
git push -u "$fork_remote" HEAD
hub pull-request -m "${brew_name} ${version#v}"
git checkout -q -
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment