Skip to content

Commit

Permalink
feat: support force redeploy cells
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyr committed Mar 27, 2024
1 parent 6b793d2 commit f8f217e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/subcommands/deploy/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ pub struct Cell {
pub name: String,
pub location: CellLocation,
pub enable_type_id: bool,
#[serde(default)]
pub force_redeploy: bool,
}

#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
Expand Down
3 changes: 2 additions & 1 deletion src/subcommands/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,8 @@ fn load_cells(
let lock_script_unchanged = lock_script.as_slice() == old_lock_script.as_slice();
let type_id_unchanged = old_recipe.type_id.is_some() == config.enable_type_id;
// NOTE: we trust `old_recipe.data_hash` here
if data_unchanged && lock_script_unchanged && type_id_unchanged {
if data_unchanged && lock_script_unchanged && type_id_unchanged && !cell.force_redeploy
{
StateChange::Unchanged {
data,
data_hash,
Expand Down

0 comments on commit f8f217e

Please sign in to comment.