Skip to content

Commit

Permalink
Fail loudly if BUCK file goes missing after running buckify_rocksdb.p…
Browse files Browse the repository at this point in the history
…y script
  • Loading branch information
mszeszko-meta committed Dec 7, 2024
1 parent 0984ac1 commit 3bcee43
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions buckifier/check_buck_targets.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# If clang_format_diff.py command is not specfied, we assume we are able to
# access directly without any path.

TGT_DIFF=`git diff BUCK | head -n 1`

Expand All @@ -17,6 +15,13 @@ cp BUCK BUCK.bkp

${PYTHON:-python3} buckifier/buckify_rocksdb.py

if [[ ! -f "BUCK" ]]
then
echo "buckifier/buckify_rocksdb.py was expected to (re)generate BUCK file."
echo "BUCK file is missing!"
exit 1
fi

TGT_DIFF=`git diff BUCK | head -n 1`

if [ -z "$TGT_DIFF" ]
Expand Down

0 comments on commit 3bcee43

Please sign in to comment.