58d2a016ce
* added ruff docs * style: Run ruff and black before yapf pass * yapf -r -i (23 fixes) * fixed conf.py and ran ruff format . * fixed conf.py 2 * formatted argparser.py * formatted src/rocprof_compute_analyze * formatted src/rocprof_compute_profile * formatted soc_base.py * formatted rocprof_compute_tui * formatted gui_components * formatted src/utils * formatted tests/ * format extra files * cleanup * fix test_utils.py * fixed typos * Update pyproject.toml * Update README.md * Update test_utils.py --------- Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> Co-authored-by: James Siddeley <James.Siddeley@amd.com> Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
35 行
895 B
Python
実行ファイル
35 行
895 B
Python
実行ファイル
#!/usr/bin/env python3
|
|
#
|
|
# Support utility to check VERSION file against a tagname. Used in
|
|
# release pipeline.
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--tag", type=str, required=True, help="tagname to check")
|
|
args = parser.parse_args()
|
|
|
|
execPath = str(Path(__file__).parent)
|
|
with open(execPath + "/../VERSION") as f:
|
|
repoVer = f.readline().strip()
|
|
|
|
repoCheck = "v" + repoVer
|
|
tag = args.tag
|
|
|
|
print("Current repository version = %s" % repoVer)
|
|
print("--> tagname = %s" % tag)
|
|
|
|
if repoCheck == tag:
|
|
print("OK: exact match")
|
|
exit(0)
|
|
elif tag.startswith(repoCheck + "-"):
|
|
print("OK: allowed match with extra delimiter")
|
|
exit(0)
|
|
elif tag.startswith("rocm-"):
|
|
print("OK: allowed match with 'rocm-' prefix")
|
|
exit(0)
|
|
else:
|
|
print("FAIL: no match - double check top-level VERSION file")
|
|
exit(1)
|