summaryrefslogtreecommitdiff
path: root/Utilities/SetupForDevelopment.sh
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-31 10:51:46 -0500
committerBrad King <brad.king@kitware.com>2017-01-31 11:16:10 -0500
commit773df0e2d7596d84a711914f1cffb4fb5a107c17 (patch)
treecb901382513b3045bd49518ea3d17a0b98c9d29e /Utilities/SetupForDevelopment.sh
parent8a76536e78e9084fb9636b2f0c57121522cfbbaf (diff)
downloadcmake-773df0e2d7596d84a711914f1cffb4fb5a107c17.tar.gz
Add pre-commit hook to check whether SetupForDevelopment must re-run
Add a version number to the `SetupForDevelopment.sh` script and use a pre-commit hook to check when it changes.
Diffstat (limited to 'Utilities/SetupForDevelopment.sh')
-rwxr-xr-xUtilities/SetupForDevelopment.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utilities/SetupForDevelopment.sh b/Utilities/SetupForDevelopment.sh
index 0a9df7e836..39152bcc42 100755
--- a/Utilities/SetupForDevelopment.sh
+++ b/Utilities/SetupForDevelopment.sh
@@ -11,3 +11,7 @@ Utilities/GitSetup/tips
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
+
+# Record the version of this setup so Git/pre-commit can check it.
+SetupForDevelopment_VERSION=1
+git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}