From 24bf5dfb6c6dc7b2552d92d6693387468b4f78a6 Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 13 Oct 2026 18:10:43 -0400 Subject: [PATCH 1/3] move conf to &mut before copy dir all --- src/cmd/deploy.rs | 10 ++++++---- src/config.rs | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/cmd/deploy.rs b/src/cmd/deploy.rs index 9c2f351..970dbf3 100644 --- a/src/cmd/deploy.rs +++ b/src/cmd/deploy.rs @@ -87,12 +87,15 @@ pub fn deploy(opts: DeployOptions) -> Result<(), Box> { let course_name = get_current_dir_name()?; let new_course_dir = repo_path.join("courses").join(&course_name); - copy_dir_all(env::current_dir()?, &new_course_dir)?; - // bails if config is bad // // force a no-skip-git - let conf = config::read_and_validate_config()?; + let mut conf = config::read_and_validate_config()?; + + config::update_time(&mut conf)?; + + copy_dir_all(env::current_dir()?, &new_course_dir)?; + println!("Committing files to remote..."); git(repo_path, &["add", "."])?; @@ -102,7 +105,6 @@ pub fn deploy(opts: DeployOptions) -> Result<(), Box> { )?; git(repo_path, &["push"])?; - config::update_time(conf)?; println!("Project successfully pushed to remote."); diff --git a/src/config.rs b/src/config.rs index 999e45d..565be2a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -261,7 +261,7 @@ fn prompt_for_color() -> Result> { /// # Returns /// * `Ok(())` if the file is successfully updated /// * `Err` if file writing fails -pub fn update_time(mut conf: OsedaConfig) -> Result<(), Box> { +pub fn update_time(conf: &mut OsedaConfig) -> Result<(), Box> { conf.last_updated = get_time(); write_config(".", &conf)?; From d780ccdca1d08b604e36aea0884fc733de61afd8 Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 13 Oct 2026 18:14:40 -0400 Subject: [PATCH 2/3] semver --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 353c198..16fb94a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1109,7 +1109,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "oseda-cli" -version = "3.2.2" +version = "3.2.3" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 94e2cf0..c14bf7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://oseda.net" repository = "https://github.com/oseda-dev/oseda-cli" readme = "README.md" name = "oseda-cli" -version = "3.2.2" +version = "3.2.3" edition = "2021" [[bin]] From 2b668a58ce84f4d8d840706d192164700a990286 Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 13 Oct 2026 18:15:17 -0400 Subject: [PATCH 3/3] fmt + clippy --- src/cmd/deploy.rs | 2 -- src/config.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cmd/deploy.rs b/src/cmd/deploy.rs index 970dbf3..5c62c41 100644 --- a/src/cmd/deploy.rs +++ b/src/cmd/deploy.rs @@ -96,7 +96,6 @@ pub fn deploy(opts: DeployOptions) -> Result<(), Box> { copy_dir_all(env::current_dir()?, &new_course_dir)?; - println!("Committing files to remote..."); git(repo_path, &["add", "."])?; git( @@ -105,7 +104,6 @@ pub fn deploy(opts: DeployOptions) -> Result<(), Box> { )?; git(repo_path, &["push"])?; - println!("Project successfully pushed to remote."); // https://github.com/oseda-dev/oseda-lib/compare/main...ReeseHatfield:oseda-lib:main?expand=1 diff --git a/src/config.rs b/src/config.rs index 565be2a..672cfb3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -264,7 +264,7 @@ fn prompt_for_color() -> Result> { pub fn update_time(conf: &mut OsedaConfig) -> Result<(), Box> { conf.last_updated = get_time(); - write_config(".", &conf)?; + write_config(".", conf)?; Ok(()) }