Delete blob and add CI check (#867)
* Delete blob and add CI check * fix * shellcheck
This commit is contained in:
parent
ebdab32b36
commit
40269a578b
5
.github/workflows/build_and_test.yml
vendored
5
.github/workflows/build_and_test.yml
vendored
@ -30,6 +30,11 @@ jobs:
|
|||||||
crate: mdbook-linkcheck
|
crate: mdbook-linkcheck
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Install mimetype
|
||||||
|
- run: sudo apt-get install libfile-mimeinfo-perl
|
||||||
|
- name: Check for binary blobs
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: ./scripts/check_for_blobs.sh
|
||||||
- name: Build libafl debug
|
- name: Build libafl debug
|
||||||
run: cargo build -p libafl
|
run: cargo build -p libafl
|
||||||
- name: Build the book
|
- name: Build the book
|
||||||
|
Binary file not shown.
19
scripts/check_for_blobs.sh
Executable file
19
scripts/check_for_blobs.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
blobs=$(find . -type f -exec sh -c '
|
||||||
|
for f; do
|
||||||
|
mimetype -b "$f" | grep -Eq "application/(x-object|x-executable)" &&
|
||||||
|
printf "%s\n" "$f"
|
||||||
|
done
|
||||||
|
' sh {} +)
|
||||||
|
|
||||||
|
if [ -z "$blobs" ]
|
||||||
|
then
|
||||||
|
echo "No object or executable files in the root directory"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Hey! There are some object or executable file in the root directory!"
|
||||||
|
echo "$blobs"
|
||||||
|
echo "Aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user