release script

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2022-03-31 21:03:45 +02:00
parent 8038f9e257
commit 095ad30ac4
1 changed files with 16 additions and 16 deletions

View File

@ -2,31 +2,31 @@
set -euo pipefail set -euo pipefail
# build program, TODO try removing --skip-lint WALLET_WITH_FUNDS=~/.config/solana/mango-devnet.json
PROGRAM_ID=m43thNJ58XCjL798ZSq6JGAG1BnWskhdq5or6kcnfsD
# TODO fix need for --skip-lint
# build program,
anchor build --skip-lint anchor build --skip-lint
# patch types, which we want in rust, but anchor client doesn't support
./idl-fixup.sh ./idl-fixup.sh
# update types in ts client package # update types in ts client package
cp -v ./target/types/mango_v4.ts ./ts/mango_v4.ts cp -v ./target/types/mango_v4.ts ./ts/mango_v4.ts
yarn clean && yarn build && cp package.json ./dist/
# if [[ -z "${PROVIDER_WALLET}" ]]; then # publish program
# echo "Please provide path to a provider wallet keypair." solana --url https://mango.devnet.rpcpool.com program deploy --program-id $PROGRAM_ID \
# exit -1 -k $WALLET_WITH_FUNDS target/deploy/mango_v4.so
# fi
# if [[ -z "${VERSION_MANUALLY_BUMPED}" ]]; then # publish idl
# echo "Please bump versions in package.json and in cargo.toml." anchor idl init --provider.cluster https://mango.devnet.rpcpool.com --provider.wallet $WALLET_WITH_FUNDS \
# exit -1 --filepath target/idl/mango_v4.json $PROGRAM_ID
# fi
# # update on chain program and IDL, atm used for testing/developing # build npm package
# anchor deploy --provider.cluster devnet --provider.wallet ${PROVIDER_WALLET} # yarn clean && yarn build && cp package.json ./dist/
# anchor idl upgrade --provider.cluster devnet --provider.wallet ${PROVIDER_WALLET}\
# --filepath target/idl/voter_stake_registry.json m43thNJ58XCjL798ZSq6JGAG1BnWskhdq5or6kcnfsD
# publish the npm package
# # publish the npm package
# yarn publish dist # yarn publish dist
# echo # echo