Skip to content

Instantly share code, notes, and snippets.

@mwrites
Last active January 28, 2023 04:26
Show Gist options
  • Save mwrites/7a843deacb346fa36f071e63b37d48a1 to your computer and use it in GitHub Desktop.
Save mwrites/7a843deacb346fa36f071e63b37d48a1 to your computer and use it in GitHub Desktop.
deploy program idl
anchor deploy ... \\
&& anchor idl init -f target/idl/thread_program.json solana address -k $(target/deploy/clockwork_thread_program.json) \\
|| anchor idl upgrade -f target/idl/thread_program.json solana address -k $(target/deploy/clockwork_thread_program.json)
Note the usage of "||"
-> Ideally anchor idl init just need to be run once and can be removed from the script entirely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment