Skip to content

Commit

Permalink
If vendor RocksDb files have changed the trigger a clean rebuild. (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhartnett authored Jun 14, 2024
1 parent 293dc07 commit 93c6df0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions scripts/build_static_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ BUILD_DEST="${REPO_DIR}/build/lib"

git submodule update --init

if ${MAKE} -C "${ROCKSDB_LIB_DIR}" --dry-run static_lib | grep -q 'Nothing to be done'; then
echo "RocksDb static libraries already built. Skipping build."
exit 0
else
${REPO_DIR}/scripts/clean_build_artifacts.sh
echo "Building RocksDb static libraries."
fi

export DISABLE_WARNING_AS_ERROR=1

export ROCKSDB_DISABLE_SNAPPY=1
Expand Down
6 changes: 4 additions & 2 deletions scripts/clean_build_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ set -e

cd "$(dirname "${BASH_SOURCE[0]}")"/..

echo "Cleaning up RocksDb build artifacts."

rm -rf build
make -C vendor/rocksdb clean
make -C vendor/rocksdb clean --no-print-directory > /dev/null

git submodule foreach --recursive git clean -fdx
git submodule foreach --recursive git clean -fdx > /dev/null

0 comments on commit 93c6df0

Please sign in to comment.