Skip to content

Commit

Permalink
Fix Android Sanity Buck version check
Browse files Browse the repository at this point in the history
Summary:
[GENERAL] [MINOR] [./scripts/validate-android-test-env.sh] - Fix buck version check
Closes #18311

Differential Revision: D7227452

Pulled By: hramos

fbshipit-source-id: c7b32afc36821fbb2462317581ae32d3b257de03
  • Loading branch information
hramos authored and facebook-github-bot committed Mar 11, 2018
1 parent adabae2 commit e057322
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions scripts/validate-android-test-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ if [ -z "$(which buck)" ]; then
exit 1
fi

BUCK_ACTUAL_COMMIT=$(buck --version)
BUCK_SUGGESTED_V="v2018.02.16.01"
BUCK_SUGGESTED_COMMIT="d743d2d0229852ce7c029ec257532d8916f6b2b7"
BUCK_SUGGESTED_COMMIT_FB="b9b76a3a5a086eb440a26d1db9b0731875975099"

if [ -z "$BUCK_ACTUAL_COMMIT" ]; then
if [ -z "$(buck --version)" ]; then
echo "Your Buck install is broken."

if [ -d "/opt/facebook" ]; then
Expand All @@ -45,10 +40,11 @@ if [ -z "$BUCK_ACTUAL_COMMIT" ]; then
fi
exit 1
else
if [ "$BUCK_ACTUAL_COMMIT" == "$BUCK_SUGGESTED_COMMIT" ]; then
echo "${BUCK_ACTUAL_COMMIT}"
elif [ ! -d "/opt/facebook" ]; then
echo "Warn: The test suite expects buck version ${BUCK_SUGGESTED_COMMIT} (${BUCK_SUGGESTED_V}) to be installed, but found ${BUCK_ACTUAL_COMMIT} instead"
BUCK_EXPECTED_VERSION="buck version d743d2d0229852ce7c029ec257532d8916f6b2b7"
if [ "$(buck --version)" != "$BUCK_EXPECTED_VERSION" ]; then
if [ ! -d "/opt/facebook" ]; then
echo "Warning: The test suite expects ${BUCK_EXPECTED_VERSION} to be installed"
fi
fi
fi

Expand Down

0 comments on commit e057322

Please sign in to comment.