Merge pull request #310 from stripedpajamas/fix-builds

OS specific keep alive funcs
This commit is contained in:
Peter Squicciarini 2019-12-20 15:59:30 -08:00 committed by GitHub
commit 26a5bfcab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,19 @@
#!/bin/bash #!/bin/bash
function keep_alive() { function keep_alive_small() {
while true; do while true; do
echo . echo .
read -t 60 < /proc/self/fd/1 > /dev/null 2>&1 read -t 60 < /proc/self/fd/1 > /dev/null 2>&1
done done
} }
function keep_alive() {
while true; do
date
sleep 60
done
}
if [[ "$SHOULD_BUILD" == "yes" ]]; then if [[ "$SHOULD_BUILD" == "yes" ]]; then
export BUILD_SOURCEVERSION=$LATEST_MS_COMMIT export BUILD_SOURCEVERSION=$LATEST_MS_COMMIT
echo "LATEST_MS_COMMIT: ${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 sed -i "s/code-oss/codium/" resources/linux/debian/postinst.template
fi fi
# this task is very slow on mac, so using a keep alive to keep travis alive # these tasks are very slow, so using a keep alive to keep travis alive
keep_alive & if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
keep_alive_small &
else
keep_alive &
fi
KA_PID=$! KA_PID=$!
yarn gulp compile-build yarn gulp compile-build