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