diff options
Diffstat (limited to 'taler-build')
-rwxr-xr-x | taler-build/switch_active.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/taler-build/switch_active.sh b/taler-build/switch_active.sh index 1390899..2555ad8 100755 --- a/taler-build/switch_active.sh +++ b/taler-build/switch_active.sh @@ -5,3 +5,23 @@ # it whenever compilation and testing succeed. # The script is not portable to system using different usernames and directories, # respect to taler.net, for blue-green deployments + +# figure out which is the inactive +ACTIVE=`readlink /home/test/sockets | awk -F/ '{print $3}'` +if [[ 'test-green' == $ACTIVE ]] +then +INACTIVE='test-blue' +else +INACTIVE='test-green' +fi + +# global build for the inactive +cd /home/$INACTIVE +source activate +# FIXME calling 'make check' before switching still missing +taler-deployment-build + +# check exit code +if [[ $? == 0 ]] +then ln -fs -T /home/$INACTIVE/sockets /home/test/sockets +fi |