2022-04-12 07:53:45 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e pipefail
|
|
|
|
|
2022-05-18 08:16:14 -07:00
|
|
|
# build program,
|
2023-05-12 04:54:53 -07:00
|
|
|
anchor build -- --features enable-gpl
|
2022-05-18 08:16:14 -07:00
|
|
|
|
|
|
|
# patch types, which we want in rust, but anchor client doesn't support
|
2022-04-12 07:53:45 -07:00
|
|
|
./idl-fixup.sh
|
2022-05-18 08:16:14 -07:00
|
|
|
|
2023-03-07 00:18:19 -08:00
|
|
|
# update idl
|
|
|
|
cp -v ./target/idl/mango_v4.json .
|
2022-05-18 08:16:14 -07:00
|
|
|
# update types in ts client package
|
2022-04-12 23:48:35 -07:00
|
|
|
cp -v ./target/types/mango_v4.ts ./ts/client/src/mango_v4.ts
|
2022-05-18 08:16:14 -07:00
|
|
|
|
2022-07-06 00:56:14 -07:00
|
|
|
(cd ./ts/client && yarn tsc)
|