mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 10:33:56 +08:00
965946724b
Summary: See title Test Plan: Run on the coffee machine Reviewers: juan, evan, spang Reviewed By: spang Differential Revision: https://phab.nylas.com/D4368
30 lines
711 B
Bash
30 lines
711 B
Bash
#!/bin/bash
|
|
|
|
# This just checks the time every 60 seconds to see if it should run the benchmarks.
|
|
# This is a hack to work around cron's/automator's inability to start GUI apps
|
|
# using `npm start`.
|
|
|
|
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
BENCHMARK_SCRIPT=$CWD/benchmark-new-commits.sh
|
|
UPLOAD_SCRIPT=$CWD/upload-benchmark-data.py
|
|
BENCHMARK_RESULTS_DIR=$HOME/.benchmark_results
|
|
TARGET_TIME="$1"
|
|
|
|
if [[ $# != 1 ]]
|
|
then
|
|
echo "Usage: run-once-per-day.sh '23:00'"
|
|
exit 1
|
|
fi
|
|
|
|
while [[ true ]]
|
|
do
|
|
CURRENT_TIME=$(date +"%H:%M")
|
|
|
|
if [[ $CURRENT_TIME = $TARGET_TIME ]]
|
|
then
|
|
/bin/bash $BENCHMARK_SCRIPT
|
|
python $UPLOAD_SCRIPT $BENCHMARK_RESULTS_DIR
|
|
fi
|
|
sleep 60
|
|
done
|
|
|