|
|
@ -23,9 +23,37 @@ fi |
|
|
|
#echo "full path dir $SFPATH" |
|
|
|
#echo "relativ path dir $SRPATH" |
|
|
|
|
|
|
|
#1.26.2 |
|
|
|
check_compose_version() { |
|
|
|
composeversion=$(docker-compose version | head -1 | cut -d',' -f1 | cut -d' ' -f3) |
|
|
|
version_good=$(echo $composeversion | awk 'BEGIN{ FS="."}; |
|
|
|
{ if ($1 < 1) { print "N"; } |
|
|
|
else if ($1 == 1) { |
|
|
|
if ($2 < 26) { print "N"; } |
|
|
|
else { print "Y"; } |
|
|
|
} |
|
|
|
else { print "Y"; } |
|
|
|
}') |
|
|
|
|
|
|
|
echo "$version_good" |
|
|
|
} |
|
|
|
|
|
|
|
composeversioncheck=$(check_compose_version) |
|
|
|
|
|
|
|
cwdir=$PWD |
|
|
|
wdir=$SFPATH |
|
|
|
cd $wdir |
|
|
|
|
|
|
|
if [ "$composeversioncheck" == "N" ]; then |
|
|
|
current=$(docker-compose version) |
|
|
|
echo current docker-conpose version too low |
|
|
|
echo current docker-compose: $current |
|
|
|
echo required 1.26.0 minimum |
|
|
|
else |
|
|
|
compose=$(docker-compose -f test/run.yml config --services) |
|
|
|
if [ "$compose" == "swarmlabclient" ]; then |
|
|
|
#echo "compose ok" |
|
|
|
|
|
|
|
./update-agent.sh |
|
|
|
cd src-local |
|
|
|
./start-server.sh |
|
|
@ -59,3 +87,12 @@ ${NOCOLOR} |
|
|
|
|
|
|
|
EOM |
|
|
|
)" |
|
|
|
else |
|
|
|
current=$(docker-compose version) |
|
|
|
echo current docker-compose version too low |
|
|
|
echo current docker-compose: $current |
|
|
|
echo required 1.26.0 minimum |
|
|
|
#echo "compose not ok" |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|