difftreelog
Merge pull request #811 from UniqueNetwork/feature/generate-types-package
in: master
Feature/generate types package
2 files changed
.github/workflows/polkadot-types.ymldiffbeforeafterboth29 strategy:29 strategy:30 matrix:30 matrix:31 include:31 include:32 - network: sapphire32 - network: "sapphire"33 usage: "--sapphire"33 usage: ""34 - network: "opal"34 - network: "opal"35 usage: ""35 usage: ""36 - network: "quartz"36 - network: "quartz"70 with:70 with:71 node-version: 1671 node-version: 16727273 - name: Install jq73 # - name: Install jq74 run: sudo apt install jq -y74 # run: sudo apt install jq -y757576 - name: Run generate_types_package script76 - name: Run generate_types_package script77 working-directory: tests77 working-directory: teststests/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] [--push] [--rpc-url=http://localhost:9933]" 1>&212 echo "Usage: [RPC_URL=http://localhost:9933] $0 <--rc|--release> [--force] [--push] [--rpc-url=http://localhost:9933]" 1>&213 exit 113 exit 114}14}151516rc=16rc=17sapphire=18release=17release=19force=18force=20push=19push=23case $i in22case $i in24 --rc)23 --rc)25 rc=124 rc=126 if test "$release" -o "$sapphire"; then usage; fi25 if test "$release"; then usage; fi27 ;;26 ;;28 --sapphire)29 sapphire=130 if test "$rc" -o "$release"; then usage; fi31 ;;32 --release)27 --release)33 release=128 release=134 if test "$rc" -o "$sapphire"; then usage; fi29 if test "$rc"; then usage; fi35 ;;30 ;;36 --force)31 --force)37 force=132 force=148esac43esac49done44done504551if test \( ! \( "$rc" -o "$release" -o "$sapphire" \) \) -o \( "${RPC_URL=}" = "" \); then46if test \( ! \( "$rc" -o "$release" \) \) -o \( "${RPC_URL=}" = "" \); then52 usage47 usage53elif test "$rc"; then48elif test "$rc"; then54 echo "Rc build"49 echo "Rc build"70 repo_branch=opal-testnet65 repo_branch=opal-testnet71 repo_tag=$repo_branch66 repo_tag=$repo_branch72 ;;67 ;;68 sapphire)69 package_name=@unique-nft/sapphire-mainnet-types70 repo_branch=sapphire-mainnet71 repo_tag=$repo_branch72 ;;73 quartz)73 quartz)74 package_name=@unique-nft/quartz-mainnet-types74 package_name=@unique-nft/quartz-mainnet-types75 repo_branch=quartz-mainnet75 repo_branch=quartz-mainnet95 repo_branch=rc95 repo_branch=rc96 repo_tag=$repo_branch96 repo_tag=$repo_branch97fi97fi98if test "$sapphire" = 1; then99 if "$spec_name" != opal; then100 echo "sapphire types can only be based on opal spec"101 exit 1102 fi103 package_name=@unique-nft/sapphire-mainnet-types104 repo_branch=sapphire-mainnet105 repo_tag=$repo_branch106fi10798108package_version=${spec_version:0:3}.$(echo ${spec_version:3:3} | sed 's/^0*//').99package_version=${spec_version:0:3}.$(echo ${spec_version:3:3} | sed 's/^0*//').109last_patch=NEVER100last_patch=NEVER