Skip to content

Commit

Permalink
main: add new force input
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidd6 committed Mar 5, 2020
1 parent 207f80e commit 146ac80
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ formula="$INPUT_FORMULA"
url="$INPUT_URL"
tag="$INPUT_TAG"
revision="$INPUT_REVISION"
force="$INPUT_FORCE"

if test -n "$url" && test -n "$tag" && test -n "$revision"; then
echo "Don't specify 'url', 'tag' and 'revision' together."
Expand Down Expand Up @@ -45,8 +46,20 @@ git config --global user.name "$actor"

export HOMEBREW_GITHUB_API_TOKEN="$token"

args=(
--no-browse
--no-audit
)

if test -n "$force"; then
args+=(--force)
fi

if test -n "$url"; then
brew bump-formula-pr --no-browse --no-audit --url="$url" "$formula"
args+=(--url="$url")
elif test -n "$tag" && test -n "$revision"; then
brew bump-formula-pr --no-browse --no-audit --tag="$tag" --revision="$revision" "$formula"
args+=(--tag="$tag")
args+=(--revision="$revision")
fi

brew bump-formula-pr "${args[@]}" "$formula"

0 comments on commit 146ac80

Please sign in to comment.