From af062ece300d47d3fd74fb28bd576cf7e49dfd9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Thu, 6 Feb 2025 22:21:47 +0200 Subject: [PATCH] cargo near deploy build-non-reproducible-wasm && cargo near deploy build-reproducible-wasm --- .../deploy/actions/non_reproducible_wasm.rs | 4 ++-- .../deploy/actions/reproducible_wasm.rs | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cargo-near/src/commands/deploy/actions/non_reproducible_wasm.rs b/cargo-near/src/commands/deploy/actions/non_reproducible_wasm.rs index 8bfab79d..9d682d0b 100644 --- a/cargo-near/src/commands/deploy/actions/non_reproducible_wasm.rs +++ b/cargo-near/src/commands/deploy/actions/non_reproducible_wasm.rs @@ -8,10 +8,10 @@ use crate::commands::build as build_command; #[interactive_clap(skip_default_from_cli)] pub struct DeployOpts { #[interactive_clap(flatten)] - /// Specify a build command args: + /// Build non-reproducible wasm step options build_command_opts: build_command::actions::non_reproducible_wasm::BuildOpts, #[interactive_clap(skip_default_input_arg)] - /// What is the contract account ID? + /// What is the target contract account ID to deploy to? contract_account_id: near_cli_rs::types::account_id::AccountId, #[interactive_clap(subcommand)] initialize: InitializeMode, diff --git a/cargo-near/src/commands/deploy/actions/reproducible_wasm.rs b/cargo-near/src/commands/deploy/actions/reproducible_wasm.rs index 5c4ff3be..66591900 100644 --- a/cargo-near/src/commands/deploy/actions/reproducible_wasm.rs +++ b/cargo-near/src/commands/deploy/actions/reproducible_wasm.rs @@ -8,13 +8,24 @@ use crate::commands::build as build_command; #[interactive_clap(skip_default_from_cli)] pub struct DeployOpts { #[interactive_clap(flatten)] - /// Specify a build command args: + /// Build reproducible wasm step options build_command_opts: build_command::actions::reproducible_wasm::BuildOpts, - /// whether to check that code has been pushed to repository during docker build + /// Whether to check that code has been pushed to repository during docker build + /// + /// When flag is not specified, a sanity check that code being built has been pushed to remote repo + /// is done before building+deploying a reproducible build. + /// This flag is used to skip this sanity check, + /// + /// Need for this was flag was discovered when deploying on Github into temporary accounts, + /// created in CI for each pull request to test the PR's code. + /// Merge commits were created for each CI run, which resided neither in base, nor target branches. + /// These temporary per-PR contracts didn't need to be linked back to their source code, + /// i.e. did not need reproducibility verification. #[interactive_clap(long)] + #[interactive_clap(verbatim_doc_comment)] skip_git_remote_check: bool, #[interactive_clap(skip_default_input_arg)] - /// What is the contract account ID? + /// What is the target contract account ID to deploy to? contract_account_id: near_cli_rs::types::account_id::AccountId, #[interactive_clap(subcommand)] initialize: InitializeMode,