summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-06-29 17:45:13 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-06-29 17:45:13 -0400
commitab185263fa43141ff325edb8dace25f99e685c3d (patch)
treeb8a6d2c18eca8808d22097c8a509d4c73071dc72
parentf9a6e31c763a32215819291bd21e792e03fb95dc (diff)
SL-15500: Install git-hooks (and requirements) and run policy check
on the entire current (branch of the) viewer repo before starting any build.
-rwxr-xr-xBuildParams2
-rwxr-xr-xbuild.sh6
2 files changed, 7 insertions, 1 deletions
diff --git a/BuildParams b/BuildParams
index c5f96d5ee3..27ae40767a 100755
--- a/BuildParams
+++ b/BuildParams
@@ -14,7 +14,7 @@ build_docs = true
build_Linux_Doxygen = true
# Need viewer-build-variables as well as other shared repositories
-buildscripts_shared_more_NAMEs="build_secrets build_variables"
+buildscripts_shared_more_NAMEs="build_secrets build_variables git_hooks"
################################################################
#### Examples of how to set the viewer_channel ####
diff --git a/build.sh b/build.sh
index 3b0cf97731..e059af4ded 100755
--- a/build.sh
+++ b/build.sh
@@ -280,6 +280,12 @@ python_cmd "$helpers/codeticket.py" addinput "Viewer Channel" "${viewer_channel}
initialize_version # provided by buildscripts build.sh; sets version id
+# install the git-hooks dependencies
+pip_install -r "$git_hooks_checkout/requirements.txt"
+# validate the branch we're about to build
+python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \
+ fatal "coding policy check failed"
+
# Now run the build
succeeded=true
last_built_variant=