Skip to content

Commit

Permalink
a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Oct 23, 2024
1 parent 8ce7cc3 commit 6161d6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/dm_xml_ci_change_enforcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def check_dm_directory(dir):
subprocess.run("git config --global --add safe.directory '*'", shell=True)

def check_dir(dir):
cmd = f'git diff HEAD^..HEAD --name-only -- {clusters}'
cmd = f'git diff HEAD^..HEAD --name-only -- {dir}'
output = subprocess.check_output(cmd, shell=True).decode().splitlines()
if output and 'spec_sha' not in output:
print(f'Data model directory {dir} had changes to the following files without a corresponding update to the spec SHA')
Expand All @@ -44,7 +44,9 @@ def check_dir(dir):
return 1
return 0

return check_dir(clusters) + check_dir(device_types)
ret = check_dir(clusters) + check_dir(device_types)
print(f'returning {ret}')
return ret


if __name__ == '__main__':
Expand Down

0 comments on commit 6161d6a

Please sign in to comment.