]> git.r.bdr.sh - rbdr/blog/blob - src/command/sync_up.rs
635de100a4c8339dc633704130a136e651697da9
[rbdr/blog] / src / command / sync_up.rs
1 use std::io::Result;
2 use crate::configuration::Configuration;
3
4 pub struct SyncUp;
5
6 impl SyncUp {
7 pub fn new() -> Self {
8 SyncUp
9 }
10 }
11
12 impl super::Command for SyncUp {
13 fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
14 vec![]
15 }
16
17 fn execute(&self, input: Option<&String>, _: &Configuration, _: &String) -> Result<()> {
18 println!("Sync Up: {:?}!", input);
19 return Ok(())
20 }
21
22 fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
23 vec![]
24 }
25
26 fn command(&self) -> &'static str {
27 "sync-up"
28 }
29
30 fn help(&self) -> &'static str {
31 "\t\t\t\tPushes to the git remote if configured"
32 }
33 }