2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 01:55:39 +00:00

[CI] Add nicer OpenAPI diffs (#7002)

* add diff action

* Update api_version.py

* always diff schemas

* move model lookup to subpath

* Add diff to step summary

* fix arg name

* use echo step instead

* split action and fail curl

* fail if download not possible

* capture code

* remove wrong syntax

* decrease download number

* revert qc

* extend version_check

* fix exit cond

* fix link

* add dummy change

* Update api_version.py

* use html for format
This commit is contained in:
Matthias Mair
2024-07-17 15:45:26 +02:00
committed by GitHub
parent 547fa179c5
commit 44a5f76213
2 changed files with 18 additions and 3 deletions

View File

@ -97,6 +97,9 @@ if __name__ == '__main__':
)
text = version_file.read_text()
results = re.findall(r"""INVENTREE_API_VERSION = (.*)""", text)
# If 2. args is true lower the version number by 1
if len(sys.argv) > 2 and sys.argv[2] == 'true':
results[0] = str(int(results[0]) - 1)
print(results[0])
exit(0)
# GITHUB_REF_TYPE may be either 'branch' or 'tag'