generate.sh 389 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # `$1` is the directory to generate the IDLs in, defaults to `./idls`
  3. if [ $# = 1 ]; then
  4. dir=$1
  5. else
  6. dir=$PWD/idls
  7. fi
  8. cd programs/idl
  9. anchor idl parse --file src/lib.rs -o $dir/parse.json
  10. anchor idl build -o $dir/build.json
  11. cd ../generics
  12. anchor idl build -o $dir/generics_build.json
  13. cd ../relations-derivation
  14. anchor idl build -o $dir/relations_build.json