difftreelog
test script clarification messages
in: master
1 file changed
tests/scripts/generate_types_package.shdiffbeforeafterboth9. $DIR/functions.sh9. $DIR/functions.sh101011usage() {11usage() {12 echo "Usage: [RPC_URL=http://localhost:9933] $0 [--rc|--release|--sapphire] [--force] [--rpc-url=http://localhost:9933]" 1>&212 echo "Usage: [RPC_URL=http://localhost:9933] $0 <--rc|--release|--sapphire> [--force] [--push] [--rpc-url=http://localhost:9933]" 1>&213 exit 113 exit 114}14}151516rc=16rc=17sapphire=17sapphire=18release=18release=19force=19force=20push=202121for i in "$@"; do22for i in "$@"; do22case $i in23case $i in35 --force)36 --force)36 force=137 force=137 ;;38 ;;39 --push)40 push=141 ;;38 --rpc-url=*)42 --rpc-url=*)39 RPC_URL=${i#*=}43 RPC_URL=${i#*=}40 ;;44 ;;188192189# This check is only active if running in interactive terminal193# This check is only active if running in interactive terminal190if [ -t 0 ]; then194if [ -t 0 ]; then191 read -p "Is everything ok at $gen? " -n 1 -r195 read -p "Is everything ok at $gen [y/n]? " -n 1 -r192 echo196 echo193 if [[ ! $REPLY =~ ^[Yy]$ ]]; then197 if [[ ! $REPLY =~ ^[Yy]$ ]]; then194 echo "Aborting!"198 echo "Aborting!"201yarn prepublish205yarn prepublish202git commit -m "chore: upgrade types to v$new_package_version"206git commit -m "chore: upgrade types to v$new_package_version"203git tag --force $repo_tag-v$new_package_version207git tag --force $repo_tag-v$new_package_version208if test "$push" = 1; then204git push --tags --force -u origin HEAD209 git push --tags --force -u origin HEAD205#yarn publish210else211 echo "--push not given, origin repo left intact"212 echo "To publish manually, go to $gen, and run \"git push --tags --force -u origin HEAD\""213fi206popd214popd207215