mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-04 11:03:22 +00:00
Address comments
This commit is contained in:
parent
4f805963f7
commit
e03d17b766
16
Makefile
16
Makefile
|
@ -1192,20 +1192,8 @@ format:
|
|||
check-format:
|
||||
build_tools/format-diff.sh -c
|
||||
|
||||
buck-targets:
|
||||
python buckifier/buckify_rocksdb.py
|
||||
|
||||
check-buck-targets: buck-targets
|
||||
$(eval TMP=$(shell bash -c "git diff TARGETS | head -n 1"))
|
||||
@echo Running git diff on TARGETS, and the first line of output is...
|
||||
@echo $(TMP)
|
||||
@if [ -z "$(TMP)" ]; then \
|
||||
exit 0; \
|
||||
else \
|
||||
echo "Please run 'make buck-targets' to update TARGETS file."; \
|
||||
echo "Do not manually update TARGETS file."; \
|
||||
exit 1; \
|
||||
fi
|
||||
check-buck-targets:
|
||||
buckifier/check_buck_targets.sh
|
||||
|
||||
package:
|
||||
bash build_tools/make_package.sh $(SHARED_MAJOR).$(SHARED_MINOR)
|
||||
|
|
31
buckifier/check_buck_targets.sh
Executable file
31
buckifier/check_buck_targets.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/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 TARGETS | head -n 1`
|
||||
|
||||
if [ ! -z "$TGT_DIFF" ]
|
||||
then
|
||||
echo "TARGETS file has uncommitted changes. Skip this check."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo Backup original TARGETS file.
|
||||
|
||||
cp TARGETS TARGETS.bkp
|
||||
|
||||
python buckifier/buckify_rocksdb.py
|
||||
|
||||
TGT_DIFF=`git diff TARGETS | head -n 1`
|
||||
|
||||
if [ -z "$TGT_DIFF" ]
|
||||
then
|
||||
mv TARGETS.bkp TARGETS
|
||||
exit 0
|
||||
else
|
||||
echo "Please run 'python buckifier/buckify_rocksdb.py' to update TARGETS file."
|
||||
echo "Do not manually update TARGETS file."
|
||||
mv TARGETS.bkp TARGETS
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue