From 82967c13609acf85fe155a564e8a6c63e5b7c454 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sun, 1 Dec 2024 15:10:44 -0500 Subject: [PATCH 1/3] feat(scripts): Rewrite gen-upgrade-proposal.sh Fixes #8784 * script arguments for target release/tag/commit and Cosmos upgrade name, plus pass-through of arbitrary `agd tx` arguments * automatic selection of upgrade name from gen-github-release.sh release contents, with interactive disambiguation (where possible) of multiple candidates * reasonable defaults for title and description from gen-github-release.sh release contents * script option `--send` to invoke `agd tx` rather than just printing it out (but successfully invocation additionally requires `--from` etc.) * readable output of the `agd tx` command and data affecting it, whether or not it is to be invoked directly * argument checking with readable error messages and usage details * use of GitHub requests and https://main.agoric.net/network-config, overridable by environment variables --- scripts/gen-upgrade-proposal.sh | 308 ++++++++++++++++++++++++++++---- 1 file changed, 275 insertions(+), 33 deletions(-) diff --git a/scripts/gen-upgrade-proposal.sh b/scripts/gen-upgrade-proposal.sh index dab5a576e9a..505c675f6e4 100755 --- a/scripts/gen-upgrade-proposal.sh +++ b/scripts/gen-upgrade-proposal.sh @@ -1,46 +1,288 @@ #! /bin/bash set -ueo pipefail +declare -r USAGE='Usage: '"$0"' \ + [