cli: Remove anchor launch (#634)
This commit is contained in:
parent
7e7e866bb2
commit
b01e1e5d4b
|
@ -20,6 +20,7 @@ incremented for features.
|
|||
|
||||
* lang: Change `#[account(init, seeds = [...], token = <expr>, authority = <expr>)]` to `#[account(init, token::mint = <expr> token::authority = <expr>)]` ([#](https://github.com/project-serum/anchor/pull/562)).
|
||||
* lang: `#[associated]` and `#[account(associated = <target>, with = <target>)]` are both removed.
|
||||
* cli: Removed `anchor launch` command
|
||||
|
||||
## [0.13.2] - 2021-08-11
|
||||
|
||||
|
|
|
@ -116,14 +116,6 @@ pub enum Command {
|
|||
/// Runs the deploy migration script.
|
||||
Migrate,
|
||||
/// Deploys, initializes an IDL, and migrates all in one command.
|
||||
Launch {
|
||||
/// True if the build should be verifiable. If deploying to mainnet,
|
||||
/// this should almost always be set.
|
||||
#[clap(short, long)]
|
||||
verifiable: bool,
|
||||
#[clap(short, long)]
|
||||
program_name: Option<String>,
|
||||
},
|
||||
/// Upgrades a single program. The configured wallet must be the upgrade
|
||||
/// authority.
|
||||
Upgrade {
|
||||
|
@ -272,10 +264,6 @@ pub fn entry(opts: Opts) -> Result<()> {
|
|||
} => upgrade(&opts.cfg_override, program_id, program_filepath),
|
||||
Command::Idl { subcmd } => idl(&opts.cfg_override, subcmd),
|
||||
Command::Migrate => migrate(&opts.cfg_override),
|
||||
Command::Launch {
|
||||
verifiable,
|
||||
program_name,
|
||||
} => launch(&opts.cfg_override, verifiable, program_name),
|
||||
Command::Test {
|
||||
skip_deploy,
|
||||
skip_local_validator,
|
||||
|
@ -1631,45 +1619,6 @@ fn upgrade(
|
|||
})
|
||||
}
|
||||
|
||||
fn launch(
|
||||
cfg_override: &ConfigOverride,
|
||||
verifiable: bool,
|
||||
program_name: Option<String>,
|
||||
) -> Result<()> {
|
||||
// Build and deploy.
|
||||
build(
|
||||
cfg_override,
|
||||
None,
|
||||
verifiable,
|
||||
program_name.clone(),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)?;
|
||||
let programs = _deploy(cfg_override, program_name)?;
|
||||
|
||||
with_workspace(cfg_override, |cfg| {
|
||||
let keypair = cfg.provider.wallet.to_string();
|
||||
|
||||
// Add metadata to all IDLs.
|
||||
for (address, program) in programs {
|
||||
if let Some(idl) = program.idl.as_ref() {
|
||||
// Store the IDL on chain.
|
||||
let idl_address = create_idl_account(cfg, &keypair, &address, idl)?;
|
||||
println!("IDL account created: {}", idl_address.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
// Run migration script.
|
||||
if Path::new("migrations/deploy.js").exists() || Path::new("migrations/deploy.ts").exists()
|
||||
{
|
||||
migrate(cfg_override)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
// The Solana CLI doesn't redeploy a program if this file exists.
|
||||
// So remove it to make all commands explicit.
|
||||
fn clear_program_keys(cfg_override: &ConfigOverride) -> Result<()> {
|
||||
|
|
|
@ -21,7 +21,6 @@ SUBCOMMANDS:
|
|||
help Prints this message or the help of the given subcommand(s)
|
||||
idl Commands for interacting with interface definitions
|
||||
init Initializes a workspace
|
||||
launch Deploys, initializes an IDL, and migrates all in one command
|
||||
migrate Runs the deploy migration script
|
||||
new Creates a new program
|
||||
test Runs integration tests against a localnetwork
|
||||
|
@ -195,23 +194,6 @@ anchor idl set-authority -n <new-authority> -p <program-id>
|
|||
Sets a new authority on the IDL account. Both the `new-authority` and `program-id`
|
||||
must be encoded in base 58.
|
||||
|
||||
## Launch
|
||||
|
||||
```
|
||||
anchor launch
|
||||
```
|
||||
|
||||
Builds, deploys and migrates, all in one command. This is particularly
|
||||
useful when simultaneously developing an app against a Localnet or Devnet. For mainnet, it's
|
||||
recommended to run each command separately, since transactions can sometimes be
|
||||
unreliable depending on the Solana RPC node being used.
|
||||
|
||||
```
|
||||
anchor launch --verifiable
|
||||
```
|
||||
|
||||
Runs the build inside a docker image so that the output binary is deterministic (assuming a Cargo.lock file is used).
|
||||
|
||||
## New
|
||||
|
||||
```
|
||||
|
@ -246,4 +228,4 @@ anchor verify <program-id>
|
|||
```
|
||||
|
||||
Verifies the on-chain bytecode matches the locally compiled artifact.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue