Check that fuzzing files are not included in the release

pull/573/head
Nicco Kunzmann 2023-10-25 12:17:51 +01:00
rodzic 4e1519488f
commit ee81991664
4 zmienionych plików z 32 dodań i 1 usunięć

Wyświetl plik

@ -34,3 +34,9 @@ jobs:
sarif_file: cifuzz-sarif/results.sarif
checkout_path: cifuzz-sarif
check-distribution:
runs-on: ubuntu-latest
steps:
- name: Do not include Apache files in the distribution.
run: |
src/icalendar/tests/test_create_release.sh

Wyświetl plik

@ -2,3 +2,4 @@ include *.rst tox.ini
graft docs
recursive-include src/icalendar *
recursive-exclude src/icalendar *.pyc *~
recursive-exclude src/icalendar/fuzzing *.py *.sh

Wyświetl plik

@ -52,7 +52,7 @@ setuptools.setup(
author_email='plone-developers@lists.sourceforge.net',
url='https://github.com/collective/icalendar',
license='BSD',
packages=setuptools.find_namespace_packages('src'),
packages=setuptools.find_namespace_packages('src', exclude=["icalendar.fuzzing"]),
package_dir={'': 'src'},
include_package_data=True,
zip_safe=False,

Wyświetl plik

@ -0,0 +1,24 @@
#!/bin/sh
#
# Create a release file and test it.
#
set -e
cd "`dirname \"$0\"`"
cd "../../.."
python3 setup.py sdist
archive=`echo dist/icalendar-*.tar.gz`
if ! [ -f "$archive" ]; then
echo "ERROR: Cannot find distribution archive '$archive'."
exit 1
fi
if tar -tf "$archive" | grep 'fuzzing/'; then
echo "ERROR: Fuzzing files are included in the release."
echo " See https://github.com/collective/icalendar/pull/569"
exit 1
fi
echo "Checks passed."