cron: Exclude what are obviously scripts from compilation.

The impetus here is to stop the script from trying to compile and
complaining about
<www/conservancy/static/projects/policies/publish-travel-policy.py>, which
is a script written in Python 3 meant to help with repository maintenance.

Excluding files with `-` in the name seems reasonable since they can't be
modules anyway, so there's no reason to compile them.

This will start failing if we add a similar script later that doesn't have a
`-` in its name.
This commit is contained in:
Brett Smith 2017-09-26 13:57:42 -04:00
parent 63f6bab95f
commit 985ce2fb6c

View file

@ -45,7 +45,7 @@ if [ "$(git rev-parse "$PRODUCTION_BRANCH")" = "$(git rev-parse "$git_upstream")
fi
git merge --quiet --ff-only "$git_remote" "$git_refspec"
python2 -m compileall -q www || exitcode=$?
python2 -m compileall -q -x - www || exitcode=$?
chgrp -R www-data www || exitcode=$?
chmod -R g+rX-w,o+X-w www || exitcode=$?
chmod -R o+r www/conservancy/static || exitcode=$?