diff --git a/admin/README.md b/admin/README.md index 3199172702..9877209694 100644 --- a/admin/README.md +++ b/admin/README.md @@ -3,7 +3,7 @@ Merge a PR that changes some `config/foo/org.yaml` and then run the following: ```shell # Displays what it would do without making changes until you add the confirm flag -bazel run //admin:update -- --github-token ~/path-to-my-token # --confirm +bazel run //admin:update -- --github-token-path ~/path-to-my-token # --confirm ``` This will default to a dry-run mode, displaying what changes it intends to make without actually updating anything on github. diff --git a/admin/update.sh b/admin/update.sh index 1d34ccad03..7784f4fed0 100755 --- a/admin/update.sh +++ b/admin/update.sh @@ -13,12 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. +if [[ $# -lt 6 ]]; then + echo "Usage: bazel run //admin:update -- --github-token-path ~/my/github/token # --confirm" >&2 + exit 1 +fi + set -o errexit set -o nounset set -o pipefail set -o xtrace +pushd "$(dirname "$(realpath "$BASH_SOURCE")")" bazel test //config:all +popd peribolos="$1" shift echo $@