Add echo statements to post-receive
This commit is contained in:
parent
d8c37ec73b
commit
f8f13b267f
|
|
@ -3,16 +3,20 @@
|
||||||
# This hook updates the working repository on dmeiburg.de
|
# This hook updates the working repository on dmeiburg.de
|
||||||
# It is meant to update the docker configs of my servers.
|
# It is meant to update the docker configs of my servers.
|
||||||
|
|
||||||
|
echo "post-receive hook started"
|
||||||
WORK_TREE=~/container
|
WORK_TREE=~/container
|
||||||
|
|
||||||
# get changed folders
|
# get changed folders
|
||||||
changed=`GIT_WORK_TREE=$WORK_TREE git diff --dirstat=files,0 HEAD | cut -f3 -d' '`
|
changed=`GIT_WORK_TREE=$WORK_TREE git diff --dirstat=files,0 HEAD | cut -f3 -d' '`
|
||||||
|
echo "change apps:"
|
||||||
|
echo $changed
|
||||||
|
|
||||||
# update files in working direcotry
|
# update files in working direcotry
|
||||||
GIT_WORK_TREE=~/container git checkout -f
|
GIT_WORK_TREE=~/container git checkout -f
|
||||||
|
|
||||||
# restart changed docker compose stacks
|
# restart changed docker compose stacks
|
||||||
for app in $changed; do
|
for app in $changed; do
|
||||||
|
echo "restarting $app"
|
||||||
cd $WORK_TREE/$changed
|
cd $WORK_TREE/$changed
|
||||||
|
|
||||||
# decrypt .env
|
# decrypt .env
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue