git.delta.rocks / unique-network / refs/commits / d7cd036effa1

difftreelog

test script clarification messages

Yaroslav Bolyukin2022-11-25parent: #6b2c051.patch.diff
in: master

1 file changed

modifiedtests/scripts/generate_types_package.shdiffbeforeafterboth
9. $DIR/functions.sh9. $DIR/functions.sh
1010
11usage() {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>&2
13 exit 113 exit 1
14}14}
1515
16rc=16rc=
17sapphire=17sapphire=
18release=18release=
19force=19force=
20push=
2021
21for i in "$@"; do22for i in "$@"; do
22case $i in23case $i in
35 --force)36 --force)
36 force=137 force=1
37 ;;38 ;;
39 --push)
40 push=1
41 ;;
38 --rpc-url=*)42 --rpc-url=*)
39 RPC_URL=${i#*=}43 RPC_URL=${i#*=}
40 ;;44 ;;
188192
189# This check is only active if running in interactive terminal193# This check is only active if running in interactive terminal
190if [ -t 0 ]; then194if [ -t 0 ]; then
191 read -p "Is everything ok at $gen? " -n 1 -r195 read -p "Is everything ok at $gen [y/n]? " -n 1 -r
192 echo196 echo
193 if [[ ! $REPLY =~ ^[Yy]$ ]]; then197 if [[ ! $REPLY =~ ^[Yy]$ ]]; then
194 echo "Aborting!"198 echo "Aborting!"
201yarn prepublish205yarn prepublish
202git 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_version
208if test "$push" = 1; then
204git push --tags --force -u origin HEAD209 git push --tags --force -u origin HEAD
205#yarn publish210else
211 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\""
213fi
206popd214popd
207215