Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix Android Sanity Buck version check #18311

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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