Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(site-builder): add permanent flag in site-builder publish command #320

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site-builder/src/site/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl SiteManager {
));
let _output = self
.walrus
.store(resource.full_path.clone(), self.epochs, false)
.store(resource.full_path.clone(), self.epochs, false, true)
.await?;
display::done();
}
Expand Down
4 changes: 2 additions & 2 deletions site-builder/src/walrus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ impl Walrus {
/// Issues a `store` JSON command to the Walrus CLI, returning the parsed output.
// NOTE: takes a mutable reference to ensure that only one store command is executed at every
// time. The issue is that the inner wallet may lock coins if called in parallel.
pub async fn store(&mut self, file: PathBuf, epochs: u64, force: bool) -> Result<StoreOutput> {
create_command!(self, store, file, epochs, force)
pub async fn store(&mut self, file: PathBuf, epochs: u64, force: bool, deletable: bool) -> Result<StoreOutput> {
create_command!(self, store, file, epochs, force, deletable)
}

/// Issues a `read` JSON command to the Walrus CLI, returning the parsed output.
Expand Down
4 changes: 3 additions & 1 deletion site-builder/src/walrus/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub enum Command {
/// duration.
#[serde(default)]
force: bool,
deletable: bool,
},
/// Reads a blob from Walrus.
Read {
Expand Down Expand Up @@ -155,11 +156,12 @@ impl WalrusCmdBuilder {
}

/// Adds a [`Command::Store`] command to the builder.
pub fn store(self, file: PathBuf, epochs: u64, force: bool) -> WalrusCmdBuilder<Command> {
pub fn store(self, file: PathBuf, epochs: u64, force: bool, deletable: bool) -> WalrusCmdBuilder<Command> {
let command = Command::Store {
file,
epochs,
force,
deletable,
};
self.with_command(command)
}
Expand Down
Loading