Skip to content

Commit f8f217e

Browse files
committed
feat: support force redeploy cells
1 parent 6b793d2 commit f8f217e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/subcommands/deploy/deployment.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pub struct Cell {
2727
pub name: String,
2828
pub location: CellLocation,
2929
pub enable_type_id: bool,
30+
#[serde(default)]
31+
pub force_redeploy: bool,
3032
}
3133

3234
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]

src/subcommands/deploy/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ fn load_cells(
738738
let lock_script_unchanged = lock_script.as_slice() == old_lock_script.as_slice();
739739
let type_id_unchanged = old_recipe.type_id.is_some() == config.enable_type_id;
740740
// NOTE: we trust `old_recipe.data_hash` here
741-
if data_unchanged && lock_script_unchanged && type_id_unchanged {
741+
if data_unchanged && lock_script_unchanged && type_id_unchanged && !cell.force_redeploy
742+
{
742743
StateChange::Unchanged {
743744
data,
744745
data_hash,

0 commit comments

Comments
 (0)