2016-12-12 16:57:39 +01:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2017-07-17 11:55:39 +02:00
|
|
|
set -o pipefail
|
|
|
|
set -e
|
|
|
|
|
2017-09-19 12:10:53 +02:00
|
|
|
source "${HOME}/bin/script_framework.sh"
|
2016-12-12 16:57:39 +01:00
|
|
|
|
|
|
|
### Determine what to push
|
|
|
|
|
2017-08-08 11:56:36 +02:00
|
|
|
step "Getting current branch"
|
2016-07-21 15:48:49 +02:00
|
|
|
|
2016-11-12 19:18:49 +01:00
|
|
|
CURRENT_BRANCH=$(git branch --list | awk '/^\*/{print $2}')
|
2016-12-12 16:57:39 +01:00
|
|
|
|
2017-08-08 11:56:36 +02:00
|
|
|
step "Loading required key to push"
|
|
|
|
git loadkey
|
|
|
|
|
2016-12-12 16:57:39 +01:00
|
|
|
step "Execute pre-push auto-hook"
|
|
|
|
git autohook pre-push
|
|
|
|
|
|
|
|
step "Execute pushes..."
|
2017-10-17 11:31:09 +02:00
|
|
|
git push -u origin ${CURRENT_BRANCH} --tags "$@"
|
2016-07-21 15:48:49 +02:00
|
|
|
|
2016-12-12 16:57:39 +01:00
|
|
|
step "Execute post-push auto-hook"
|
|
|
|
git autohook post-push
|