cfg/bin/git-c

26 lines
514 B
Plaintext
Raw Normal View History

#!/bin/bash
2016-07-21 13:48:49 +00:00
set -euo pipefail
source "${HOME}/bin/script_framework.sh"
2016-10-19 15:25:32 +00:00
2016-10-19 15:20:54 +00:00
### Fix committer email by repo
step "Ensure correct commit config..."
git committerconfig
2016-10-19 15:20:54 +00:00
### Commit
2016-10-19 15:25:32 +00:00
step "Loading passphrase for GPG key..."
vault-gpg $(git config user.signingkey)
2016-10-19 15:25:32 +00:00
step "Execute pre-commit auto-hook"
git autohook pre-commit
2016-10-19 15:25:32 +00:00
step "Issuing commit..."
COMMIT_OPTS=$(git config --get commit.cliopts 2>/dev/null || echo "")
git commit -v ${COMMIT_OPTS} "$@"
2016-07-21 13:48:49 +00:00
step "Execute post-commit auto-hook"
git autohook post-commit