aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev_tools/src/bin/ci.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/dev_tools/src/bin/ci.rs b/dev_tools/src/bin/ci.rs
index a5f581d..554425e 100644
--- a/dev_tools/src/bin/ci.rs
+++ b/dev_tools/src/bin/ci.rs
@@ -14,10 +14,16 @@ fn main() {
run_cmd!("git commit -m \"CI Temp\"").unwrap();
}
- if ci().is_ok() {
- println_cargo_style!("Done: All check passed!")
+ if let Err(exit_code) = ci() {
+ if needs_commit_temp {
+ run_cmd!("git restore .").unwrap();
+ run_cmd!("git reset --soft HEAD~1").unwrap();
+ }
+ exit(exit_code)
}
+ println_cargo_style!("Done: All check passed!");
+
let is_worktree_clean = run_cmd!("git diff-index --quiet HEAD --").is_ok();
if !is_worktree_clean {
eprintln_cargo_style!("Documents needs refresh!");