ruby-build/script/brew-publish

13 lines
359 B
Text
Raw Permalink Normal View History

2016-12-20 15:43:19 +09:00
#!/usr/bin/env bash
2016-09-16 13:00:46 +02:00
# Usage: script/brew-publish <formula-name> <repo> <version>
set -euo pipefail
brew_name="${1?}"
2016-09-16 13:00:46 +02:00
repo="${2?}"
version="${3?}"
shift 3
2016-09-16 13:00:46 +02:00
url="https://github.com/${repo}/archive/${version}.tar.gz"
2015-05-19 21:33:47 +02:00
checksum="$(curl -fsSL "$url" | shasum -a 256 -b | awk '{print $1}')"
2016-09-16 13:00:46 +02:00
brew bump-formula-pr --url="$url" --sha256="$checksum" "$brew_name" "$@"