From e379b371103a52baf3c669aee62d9cb2c3d91fe6 Mon Sep 17 00:00:00 2001 From: Peter Squicciarini Date: Fri, 20 Dec 2019 14:20:10 -0800 Subject: [PATCH] OS specific keep alive funcs --- build.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 1ba8bc5..c47ffbb 100755 --- a/build.sh +++ b/build.sh @@ -1,12 +1,19 @@ #!/bin/bash -function keep_alive() { +function keep_alive_small() { while true; do echo . read -t 60 < /proc/self/fd/1 > /dev/null 2>&1 done } +function keep_alive() { + while true; do + date + sleep 60 + done +} + if [[ "$SHOULD_BUILD" == "yes" ]]; then export BUILD_SOURCEVERSION=$LATEST_MS_COMMIT echo "LATEST_MS_COMMIT: ${LATEST_MS_COMMIT}" @@ -69,8 +76,13 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then sed -i "s/code-oss/codium/" resources/linux/debian/postinst.template fi - # this task is very slow on mac, so using a keep alive to keep travis alive - keep_alive & + # these tasks are very slow, so using a keep alive to keep travis alive + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + keep_alive_small & + else + keep_alive & + fi + KA_PID=$! yarn gulp compile-build