2022-02-23 02:09:17 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2022-03-23 07:39:11 -07:00
|
|
|
# build program, TODO try removing --skip-lint
|
|
|
|
anchor build --skip-lint
|
2022-03-31 04:30:05 -07:00
|
|
|
./idl-fixup.sh
|
2022-03-23 07:39:11 -07:00
|
|
|
|
|
|
|
# update types in ts client package
|
|
|
|
cp -v ./target/types/mango_v4.ts ./ts/mango_v4.ts
|
2022-02-23 02:12:14 -08:00
|
|
|
yarn clean && yarn build && cp package.json ./dist/
|
2022-02-23 02:09:17 -08:00
|
|
|
|
2022-03-23 07:39:11 -07:00
|
|
|
# if [[ -z "${PROVIDER_WALLET}" ]]; then
|
|
|
|
# echo "Please provide path to a provider wallet keypair."
|
|
|
|
# exit -1
|
|
|
|
# fi
|
|
|
|
|
|
|
|
# if [[ -z "${VERSION_MANUALLY_BUMPED}" ]]; then
|
|
|
|
# echo "Please bump versions in package.json and in cargo.toml."
|
|
|
|
# exit -1
|
|
|
|
# fi
|
|
|
|
|
|
|
|
# # update on chain program and IDL, atm used for testing/developing
|
|
|
|
# anchor deploy --provider.cluster devnet --provider.wallet ${PROVIDER_WALLET}
|
|
|
|
# anchor idl upgrade --provider.cluster devnet --provider.wallet ${PROVIDER_WALLET}\
|
2022-03-30 08:16:32 -07:00
|
|
|
# --filepath target/idl/voter_stake_registry.json m43thNJ58XCjL798ZSq6JGAG1BnWskhdq5or6kcnfsD
|
2022-03-23 07:39:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
# # publish the npm package
|
|
|
|
# yarn publish dist
|
|
|
|
|
|
|
|
# echo
|
|
|
|
# echo Remember to commit and push the version update as well as the changes
|
|
|
|
# echo to ts/mango_v4.tx.
|
|
|
|
# echo
|