cicd.sh 667 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # Buld and deploy this program with ease using a single command
  3. # Run this script with "bash cicd.sh" or "./cicd.sh"
  4. # Note: Try running "chmod +x cicd.sh" if you face any issues.
  5. # Check if cargo is installed
  6. if ! command -v cargo &> /dev/null
  7. then
  8. echo "Cargo could not be found. Please install Rust."
  9. exit 1
  10. fi
  11. # Check if solana CLI is installed
  12. if ! command -v solana &> /dev/null
  13. then
  14. echo "Solana CLI could not be found. Please install Solana."
  15. exit 1
  16. fi
  17. # Build
  18. cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
  19. # Deploy
  20. solana program deploy ./program/target/so/create_account_program.so