forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convenient scripts for working with rbt.
Prevents having to memorize flags, and saves some editing in the web form.
- Loading branch information
Benjy
committed
Jun 17, 2014
1 parent
615aa21
commit fb983fb
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Convenient shortcut script for creating a new Pants rbt review: | ||
# | ||
# ./rbt-create <name> ... <name> <other flags> | ||
# | ||
# will create a review with the specified names as reviewers, with pants-reviews as a group, | ||
# and with the other flags passed through to rbt. | ||
|
||
NAME_REGEX="[a-z].+" | ||
REVIEWERS="" | ||
|
||
while [[ $1 ]] && [[ $1 =~ ${NAME_REGEX} ]]; do | ||
REVIEWERS="${REVIEWERS},$1" | ||
shift | ||
done | ||
|
||
REVIEWERS=${REVIEWERS:1} # Strip leading comma. | ||
|
||
if [[ ${REVIEWERS} ]]; then | ||
REVIEWERS_FLAG="--target-people=${REVIEWERS}" | ||
fi | ||
|
||
./rbt post -o -g --target-groups=pants-reviews ${REVIEWERS_FLAG} "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Convenient shortcut script for updating an existing Pants rbt review: | ||
# | ||
# ./rbt-update <other flags> | ||
# | ||
# will update the existing review, passing the flags through to rbt. | ||
|
||
./rbt post -o -u "$@" |