Skip to content

Commit

Permalink
add filename check (#14)
Browse files Browse the repository at this point in the history
* oops filename add check

* testing filename mistake

* fix error on no diff of subdir

* print filenames and test filename mismatch

* update check and remove dir
  • Loading branch information
jasondaming authored Oct 18, 2024
1 parent 890d8b9 commit 153afea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo "Base commit: $BASE_COMMIT"
# Get list of added or modified JSON files in subdirectories
git diff --diff-filter=AM --name-only $BASE_COMMIT HEAD | grep '.*/.*\.json$' > changed_json_files.txt
git diff --diff-filter=AM --name-only $BASE_COMMIT HEAD | grep '.*/.*\.json$' > changed_json_files.txt || true
# Output the list of files
echo "Changed JSON files in subdirectories:"
Expand Down
2 changes: 1 addition & 1 deletion 2025/PathplannerLib-2025.0.0-beta-3.1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"fileName": "PathplannerLib-beta.json",
"fileName": "PathplannerLib-2025.0.0-beta-3.1.json",
"name": "PathplannerLib",
"version": "2025.0.0-beta-3.1",
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
Expand Down
3 changes: 3 additions & 0 deletions check.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ def check_file(filename):

if not j['cppDependencies']:
error('no C++ dependencies (at least one is required)')

if j['fileName'] != os.path.basename(filename):
error('{0} does not match filename key: {1}'.format(j['fileName'], os.path.basename(filename)))

# should have linuxathena as at least one of the cppDependencies platforms
if j['cppDependencies']:
Expand Down

0 comments on commit 153afea

Please sign in to comment.