don't cleanup versions in use

pull/248/head
Fabian Jakobs 2016-02-08 15:30:02 +00:00
rodzic 9bb42c694d
commit 0d3a6cd467
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -183,7 +183,8 @@ _b9_deploy_update_services() {
done done
~/supervisord_start_script.sh || ~/supervisord_start_script.sh -f || ~/supervisord_start_script.sh -f; ~/supervisord_start_script.sh || ~/supervisord_start_script.sh -f || ~/supervisord_start_script.sh -f;
cd /home/ubuntu/versions; cd /home/ubuntu/versions;
ls -t 2>/dev/null | grep $BUILD_NAME | tail -n +$TOTAL_VERSIONS_TO_KEEP | xargs sudo rm -rf;" USED_VERSIONS=\$(ls -l | grep -F -- '-> /home/ubuntu/versions' | awk -F'-> ' '{print \$2}');
ls -t 2>/dev/null | grep $BUILD_NAME | grep -v -F \"\$USED_VERSIONS\" | tail -n +$TOTAL_VERSIONS_TO_KEEP | xargs sudo rm -rf;"
} }
_b9_deploy_check() { _b9_deploy_check() {