Adds hooks for secrets
This commit is contained in:
parent
63fcd502a8
commit
7a56328fad
4 changed files with 50 additions and 11 deletions
13
.config/yadm/hooks/post_commit
Executable file
13
.config/yadm/hooks/post_commit
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
handleSecretChanges() {
|
||||
secretsFolderPath="$HOME/.local/share/secrets"
|
||||
|
||||
message=$(yadm log -1 --format="%s")
|
||||
hash=$(yadm rev-parse HEAD)
|
||||
|
||||
git --git-dir "$secretsFolderPath/.git" --work-tree "$secretsFolderPath" add .
|
||||
git --git-dir "$secretsFolderPath/.git" --work-tree "$secretsFolderPath" commit -m "$message" -m "Issued from YADM by commit '$hash'"
|
||||
}
|
||||
|
||||
handleSecretChanges
|
||||
Loading…
Add table
Add a link
Reference in a new issue