cfg/bin/git-pot
Knut Ahlers ec887105a8
Set tracking branch when pushing
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-10-17 11:31:09 +02:00

24 lines
441 B
Bash
Executable file

#!/bin/bash -e
set -o pipefail
set -e
source "${HOME}/bin/script_framework.sh"
### Determine what to push
step "Getting current branch"
CURRENT_BRANCH=$(git branch --list | awk '/^\*/{print $2}')
step "Loading required key to push"
git loadkey
step "Execute pre-push auto-hook"
git autohook pre-push
step "Execute pushes..."
git push -u origin ${CURRENT_BRANCH} --tags "$@"
step "Execute post-push auto-hook"
git autohook post-push