Skip to content

Commit

Permalink
feat: Add two new hooks after_sync_clean and after_sync_dirty
Browse files Browse the repository at this point in the history
Also make it so after_sync always runs after sync regardless of dirty
state of the git repository.
  • Loading branch information
chasinglogic committed Sep 25, 2024
1 parent 6901e7e commit 624c29f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/profiles/mappings.rs

This file was deleted.

6 changes: 5 additions & 1 deletion src/profiles/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,13 @@ impl Profile {

if is_dirty && has_origin && !pull_only {
self.git(["push", "origin", &branch_name])?;
self.run_hook("after_sync")?;
self.run_hook("after_sync_dirty")?;
} else {
self.run_hook("after_sync_clean")?;
}

self.run_hook("after_sync")?;

for profile in &self.modules {
profile.sync()?;
}
Expand Down

0 comments on commit 624c29f

Please sign in to comment.