Sync hooks
- Dominant language
- Haskell
- Stars
- 50
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
S3 isn't the only way to backup your store. We can already write to a local directory, but what I envision are sync hooks.
For `sync-to`:
1. cabal-cache writes the to be synced artifacts into a temp dir
2. It CDs to that directory
3. It invokes the sync hook
4. It cleans up the directory
For `sync-from`:
1. it writes a file that contains all the artifact names that should be pulled (one artifact per line) to a temporary location
2. It creates another temporary directory and CDs into it
3. it invokes the hook with the filename as the first argument and expects the hook to sync to the current directory
4. it merges the files to the cabal store
5. It cleans up all the dirs
Then we would have two scripts per hook. E.g. we would have for rsync:
1. `~/.config/cabal/cache/hooks/rsync/from.sh`
2. `~/.config/cabal/cache/hooks/rsync/to.sh`
And you would invoke cabal-cache like so: `cabal-cache sync-to --method=rsync`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.