- fn execute(&self, input: Option<&String>) -> Result<()> {
- println!("Publish Archive: {:?}!", input);
+ fn execute(&self, input: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> {
+
+ let input = input.expect("You must provide a location to publish the archive");
+
+ Command::new(COMMAND)
+ .arg("--version")
+ .stdout(Stdio::null())
+ .stderr(Stdio::null())
+ .status()
+ .expect("Publishing requires rsync");
+
+
+ Command::new(COMMAND)
+ .arg("-r")
+ .arg(format!("{}/", &configuration.archive_output_directory.display()))
+ .arg(input.as_str())
+ .stdout(Stdio::null())
+ .stderr(Stdio::null())
+ .status()
+ .expect("Publishing requires rsync");