3 files changed
+6
-15
crates/cli/src/deploy/config.rs
+4
@@ -24,6 +24,10 @@ pub(crate) async fn check_config(env: Environment) -> Result<Config, ConfigError
24
if !config_path.exists() {
25
spinner.stop_and_persist(&succeed_symbol(), succeed_message("Setting up deployment"));
26
setup_project(env).await?;
27
+ spinner = Spinner::new(
28
+ spinners::Spinners::SimpleDotsScrolling,
29
+ succeed_message("Checking config"),
30
+ );
31
}
32
33
// Parse toml file
crates/cli/src/deploy/setup.rs
+1
-3
@@ -50,11 +50,9 @@ pub async fn setup_project(env: Environment) -> Result<Config, ConfigError> {
50
}
51
52
// Write config to .smb/config.toml
53
- let config_toml = toml::to_string_pretty(&config).map_err(|_| ConfigError::MissingConfig)?;
53
+ let config_toml = toml::to_string(&config).map_err(|_| ConfigError::MissingConfig)?;
54
fs::write(".smb/config.toml", config_toml).map_err(|_| ConfigError::MissingConfig)?;
55
56
- println!("Config saved to .smb/config.toml");
57
-
56
Ok(config)
57
}
58
crates/smbcloud-model/src/project.rs
+1
-12
@@ -17,24 +17,13 @@ pub struct Project {
17
pub name: String,
18
pub repository: String,
19
pub description: Option<String>,
20
- #[serde(with = "ar_date_format")]
20
pub created_at: DateTime<Utc>,
22
- #[serde(with = "ar_date_format")]
21
pub updated_at: DateTime<Utc>,
22
}
23
24
impl Display for Project {
25
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28
- write!(
29
- f,
30
- "ID: {}\nName: {}\nRepository: {}\nDescription: {}\nCreated At: {}\nUpdated At: {}",
31
- self.id,
32
- self.name,
33
- self.repository,
34
- self.description.as_deref().unwrap_or(""),
35
- self.created_at.format("%Y-%m-%d %H:%M:%S"),
36
- self.updated_at.format("%Y-%m-%d %H:%M:%S"),
37
- )
26
+ write!(f, "ID: {}, Name: {}", self.id, self.name,)
27
}
28
}
29
#[derive(Serialize, Debug)]