2017-11-10 11:44:57 +00:00
|
|
|
#!/bin/bash
|
2016-07-21 13:48:49 +00:00
|
|
|
|
2017-12-15 11:29:57 +00:00
|
|
|
set -euo pipefail
|
2017-07-17 09:55:39 +00:00
|
|
|
|
2017-09-19 10:10:53 +00:00
|
|
|
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
|
|
|
|
|
2017-11-10 11:44:57 +00:00
|
|
|
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..."
|
2016-10-19 15:55:36 +00:00
|
|
|
vault-gpg $(git config user.signingkey)
|
2016-10-19 15:25:32 +00:00
|
|
|
|
2016-12-12 15:57:39 +00:00
|
|
|
step "Execute pre-commit auto-hook"
|
|
|
|
git autohook pre-commit
|
|
|
|
|
2016-10-19 15:25:32 +00:00
|
|
|
step "Issuing commit..."
|
2017-11-10 11:44:57 +00:00
|
|
|
COMMIT_OPTS=$(git config --get commit.cliopts 2>/dev/null || echo "")
|
|
|
|
git commit -v ${COMMIT_OPTS} "$@"
|
2016-07-21 13:48:49 +00:00
|
|
|
|
2016-12-12 15:57:39 +00:00
|
|
|
step "Execute post-commit auto-hook"
|
|
|
|
git autohook post-commit
|