From 4eef086e3e9e9a957a2dbbbd9603a4190f008f36 Mon Sep 17 00:00:00 2001 From: Mark Hahnenberg Date: Tue, 4 Apr 2017 12:31:06 -0700 Subject: [PATCH] [client-app] Fix benchmark script Summary: We weren't changing into the directory of the git repository, so running the script from anywhere but inside the git repo didn't work. We also weren't pulling before checking for the latest commit. Now we do both of these things. Test Plan: Run locally Reviewers: spang, juan, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D4339 --- scripts/benchmark-new-commits.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/benchmark-new-commits.sh b/scripts/benchmark-new-commits.sh index 099d8ad0b..21cb98d12 100644 --- a/scripts/benchmark-new-commits.sh +++ b/scripts/benchmark-new-commits.sh @@ -12,12 +12,14 @@ BENCHMARK_RESULTS_DIR="$HOME/.benchmark_results" mkdir -p $BENCHMARK_RESULTS_DIR CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -LAST_COMMIT=$(cat $BENCHMARK_RESULTS_DIR/last_commit) -NEXT_COMMIT=$(get_next_commit $LAST_COMMIT) +cd $CWD/.. git checkout -q master git pull -q --rebase +LAST_COMMIT=$(cat $BENCHMARK_RESULTS_DIR/last_commit) +NEXT_COMMIT=$(get_next_commit $LAST_COMMIT) + while [[ $NEXT_COMMIT != '' ]] do echo $NEXT_COMMIT