Skip to content

Commit

Permalink
Fix testnet script.
Browse files Browse the repository at this point in the history
  • Loading branch information
msinkec committed Feb 9, 2024
1 parent 78c0399 commit 84e7c9b
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions scripts/testnet.sh
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
#!/bin/sh
set -e

day_mod=`expr $(date +%d) % 9`
day_mod=$(expr $(date +%d) % 9)

echo "day_mod: $day_mod"

if [ $day_mod -eq 0 ]; then
if [ "$TRAVIS_OS_NAME" -eq "linux" ] && [ "$TRAVIS_NODE_VERSION" -eq "16" ] ; then
echo "run on linux, nodejs=16";
npm run test:testnet;
fi
elif [ $day_mod -eq 1 ]; then
if [ "$TRAVIS_OS_NAME" -eq "linux" ] && [ "$TRAVIS_NODE_VERSION" -eq "18" ] ; then
echo "run on linux, nodejs=18";
npm run test:testnet;
fi
elif [ $day_mod -eq 2 ]; then
if [ "$TRAVIS_OS_NAME" -eq "linux" ] && [ "$TRAVIS_NODE_VERSION" -eq "19" ] ; then
echo "run on linux, nodejs=19";
npm run test:testnet;
fi
elif [ $day_mod -eq 3 ]; then
if [ "$TRAVIS_OS_NAME" -eq "osx" ] && [ "$TRAVIS_NODE_VERSION" -eq "16" ] ; then
echo "run on osx, nodejs=16";
npm run test:testnet;
fi
elif [ $day_mod -eq 4 ]; then
if [ "$TRAVIS_OS_NAME" -eq "osx" ] && [ "$TRAVIS_NODE_VERSION" -eq "18" ] ; then
echo "run on osx, nodejs=18";
npm run test:testnet;
fi
elif [ $day_mod -eq 5 ]; then
if [ "$TRAVIS_OS_NAME" -eq "osx" ] && [ "$TRAVIS_NODE_VERSION" -eq "19" ] ; then
echo "run on osx, nodejs=19";
npm run test:testnet;
fi
elif [ $day_mod -eq 6 ]; then
if [ "$TRAVIS_OS_NAME" -eq "windows" ] && [ "$TRAVIS_NODE_VERSION" -eq "16" ] ; then
echo "run on windows, nodejs=16";
npm run test:testnet;
fi
elif [ $day_mod -eq 7 ]; then
if [ "$TRAVIS_OS_NAME" -eq "windows" ] && [ "$TRAVIS_NODE_VERSION" -eq "18" ] ; then
echo "run on windows, nodejs=18";
npm run test:testnet;
fi
elif [ $day_mod -eq 8 ]; then
if [ "$TRAVIS_OS_NAME" -eq "windows" ] && [ "$TRAVIS_NODE_VERSION" -eq "19" ] ; then
echo "run on windows, nodejs=19";
npm run test:testnet;
if [ "$day_mod" -eq 0 ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_NODE_VERSION" = "16" ]; then
echo "run on linux, nodejs=16"
npm run test:testnet
fi
elif [ "$day_mod" -eq 1 ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_NODE_VERSION" = "18" ]; then
echo "run on linux, nodejs=18"
npm run test:testnet
fi
elif [ "$day_mod" -eq 2 ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_NODE_VERSION" = "19" ]; then
echo "run on linux, nodejs=19"
npm run test:testnet
fi
elif [ "$day_mod" -eq 3 ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_NODE_VERSION" = "16" ]; then
echo "run on osx, nodejs=16"
npm run test:testnet
fi
elif [ "$day_mod" -eq 4 ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_NODE_VERSION" = "18" ]; then
echo "run on osx, nodejs=18"
npm run test:testnet
fi
elif [ "$day_mod" -eq 5 ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_NODE_VERSION" = "19" ]; then
echo "run on osx, nodejs=19"
npm run test:testnet
fi
elif [ "$day_mod" -eq 6 ]; then
if [ "$TRAVIS_OS_NAME" = "windows" ] && [ "$TRAVIS_NODE_VERSION" = "16" ]; then
echo "run on windows, nodejs=16"
npm run test:testnet
fi
elif [ "$day_mod" -eq 7 ]; then
if [ "$TRAVIS_OS_NAME" = "windows" ] && [ "$TRAVIS_NODE_VERSION" = "18" ]; then
echo "run on windows, nodejs=18"
npm run test:testnet
fi
elif [ "$day_mod" -eq 8 ]; then
if [ "$TRAVIS_OS_NAME" = "windows" ] && [ "$TRAVIS_NODE_VERSION" = "19" ]; then
echo "run on windows, nodejs=19"
npm run test:testnet
fi
else
echo "day_mod: error"
exit -1;
exit 1
fi

0 comments on commit 84e7c9b

Please sign in to comment.