ci: Check that non-scripts aren’t marked executable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-12-05 16:12:00 -08:00 committed by Tim Abbott
parent 761ca16d6d
commit 872f4b41c1
16 changed files with 10 additions and 0 deletions

View File

@ -150,6 +150,7 @@ jobs:
./tools/test-migrations
./tools/setup/optimize-svg --check
./tools/setup/generate_integration_bots_avatars.py --check-missing
./tools/ci/check-executables
# Ban check-database-compatibility.py from transitively
# relying on static/generated, because it might not be

0
static/images/integrations/logos/jotform.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

0
static/images/store-badges/app-store-badge.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
templates/zerver/help/include/sidebar_index.md Executable file → Normal file
View File

0
templates/zerver/help/open-the-compose-box.md Executable file → Normal file
View File

9
tools/ci/check-executables Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
files="$(git ls-tree -r @ | sed -n 's/^100755 blob \S\+\t//p' | xargs -r grep -Lz '^#!' --)" || [ $? = 123 ]
if [ "$files" ]; then
echo 'error: non-scripts should not be marked executable (fix with chmod -x):'
echo
printf '%s\n' "$files"
exit 1
fi

0
tools/droplets/cleanup.py Executable file → Normal file
View File

0
zerver/data_import/slack.py Executable file → Normal file
View File

0
zerver/lib/mdiff.py Executable file → Normal file
View File

0
zerver/views/development/email_log.py Executable file → Normal file
View File

View File

0
zerver/webhooks/github/fixtures/team__edited_name.json Executable file → Normal file
View File

View File

View File

View File