summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-06-30 09:48:02 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-06-30 09:48:02 -0400
commit6460b7ac419021ca998c5f849ad382423599fc58 (patch)
treee27d9a0b3e8e2a1cde6b2c10ab2d6f6196f902cd
parentd2de2f9d252be32b262b929fe7565729417d789b (diff)
SL-15500: Only run coding_policy_git.py on Mac
since it fails on Windows due to some problem in the underlying library. Also wrap the coding policy checks in a TC log subsection.
-rwxr-xr-xbuild.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/build.sh b/build.sh
index 64aa402fae..961d1df30d 100755
--- a/build.sh
+++ b/build.sh
@@ -280,12 +280,21 @@ 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 "$(native_path "$git_hooks_checkout/requirements.txt")" || \
- fatal "pip install git-hooks failed"
-# validate the branch we're about to build
-python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \
- fatal "coding policy check failed"
+begin_section "coding policy check"
+# On our TC Windows build hosts, the GitPython library underlying our
+# coding_policy_git.py script fails to run git for reasons we have not tried
+# to diagnose. Clearly git works fine on those hosts, or we would never get
+# this far. Running coding policy checks on one platform *should* suffice...
+if [[ "$arch" == "Darwin" ]]
+then
+ # install the git-hooks dependencies
+ pip install -r "$(native_path "$git_hooks_checkout/requirements.txt")" || \
+ fatal "pip install git-hooks failed"
+ # validate the branch we're about to build
+ python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \
+ fatal "coding policy check failed"
+fi
+end_section "coding policy check"
# Now run the build
succeeded=true