yadm-config/.config/yadm/hooks/post_commit

13 lines
397 B
Bash
Executable file

#!/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