rbenv-ruby-build/script/brew-publish
2016-12-21 10:51:08 +09:00

13 lines
359 B
Bash
Executable file

#!/usr/bin/env bash
# Usage: script/brew-publish <formula-name> <repo> <version>
set -euo pipefail
brew_name="${1?}"
repo="${2?}"
version="${3?}"
shift 3
url="https://github.com/${repo}/archive/${version}.tar.gz"
checksum="$(curl -fsSL "$url" | shasum -a 256 -b | awk '{print $1}')"
brew bump-formula-pr --url="$url" --sha256="$checksum" "$brew_name" "$@"