Skip to content

Commit

Permalink
Fix CI checker so it properly checks spec_sha
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Jan 21, 2025
1 parent 990d225 commit 94759aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/dm_xml_ci_change_enforcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ def check_dm_directory(dir):

def check_dir(dir):
cmd = f'git diff HEAD^..HEAD --name-only -- {dir}'
output = subprocess.check_output(cmd, shell=True).decode().splitlines()
output = subprocess.check_output(cmd, shell=True).decode()
if output and 'spec_sha' not in output and 'scraper_version' not in output:
print(f'Data model directory {dir} had changes to the following files without a corresponding update to the spec SHA')
print(output)
print("Note that the data_model directory files are automatically updated by a spec scraper and should not be manually updated.")
return 1
return 0

ret = check_dir(clusters) + check_dir(device_types)
ret = check_dir(dir)
sys.exit(ret)


Expand Down

0 comments on commit 94759aa

Please sign in to comment.