Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbrs committed Nov 17, 2023
1 parent 00843f9 commit 5a707c2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/cairo_programs_verifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ has_errors=false

# function to list modified cairo files
list_modified_cairo_files() {
echo $(git diff --name-only main...HEAD)
echo "git diff $(git diff --name-only main...HEAD -- programs | grep -E 'programs/ch.*/*.cairo$')"
git diff --name-only main...HEAD -- listings | grep -E 'listings/ch.*/*.cairo$'
}

# function to process individual file
process_file() {
dir=$(dirname "$1")
file=$(basename "$1")
echo "Processing $dir/$file"
echo "Processing the file: $dir/$file"
(cd "$dir" && scarb build "$file" 0>/dev/null 1> error.log && scarb fmt -c "$file" 0>/dev/null 1>> error.log && scarb test "$file" 0>/dev/null 1>> error.log)
if [ $? -ne 0 ]; then
has_errors=true
Expand All @@ -29,8 +29,7 @@ process_file() {

# process each modified file
modified_files=$(list_modified_cairo_files)
echo "modified files:"
echo "$modified_files"
echo "modified files: are $modified_files"
for file in $modified_files; do
process_file "$file" &
done
Expand Down

0 comments on commit 5a707c2

Please sign in to comment.