Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Jul 30, 2024
1 parent 7bf15ca commit 88bd8d1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/versionCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,22 @@ jobs:
# version was updated
CONTRACT_NAME=$(basename "$FILE" .sol)
NEW_VERSION=$(echo "$VERSION_TAG" | awk '{print $NF}')
UPDATED_CONTRACTS+=("$CONTRACT_NAME $NEW_VERSION")
else
# version was not updated
MISSING_VERSION_UPDATE+=("$FILE")
UPDATED_CONTRACTS+=("$CONTRACT_NAME v$NEW_VERSION")
fi
fi
fi
done <<< "$FILES"
# Check for missing version updates
while IFS= read -r FILE; do
if [[ "$FILE" == *.sol ]]; then
VERSION_TAG=$(grep -E '^/// @custom:version' "$FILE" || true)
if [[ -n "$VERSION_TAG" ]] && ! git diff -U0 origin/${BASE_REF} HEAD "$FILE" | grep -qE '^@@.*\+/// @custom:version'; then
MISSING_VERSION_UPDATE+=("$FILE")
fi
fi
done <<< "$FILES"
# Output the results
if [[ ${#MISSING_VERSION_TAG[@]} -ne 0 ]]; then
echo "Files missing version tags: ${MISSING_VERSION_TAG[*]}"
Expand Down

0 comments on commit 88bd8d1

Please sign in to comment.