diff --git a/tests/python_client/deploy/scripts/get_tag.py b/tests/python_client/deploy/scripts/get_tag.py index 5fb34e63df..79e28b9960 100644 --- a/tests/python_client/deploy/scripts/get_tag.py +++ b/tests/python_client/deploy/scripts/get_tag.py @@ -3,8 +3,10 @@ import json milvus_dev = "https://registry.hub.docker.com/v2/repositories/milvusdb/milvus-dev/tags?ordering=last_updated" milvus = "https://registry.hub.docker.com/v2/repositories/milvusdb/milvus/tags?ordering=last_updated" + + def get_tag(url): - payload={} + payload = {} headers = {} response = requests.request("GET", url, headers=headers, data=payload) @@ -13,17 +15,18 @@ def get_tag(url): tags = [r["name"] for r in res] return tags + latest_tag = "master-latest" latest_rc_tag = [tag for tag in sorted(get_tag(milvus)) if "rc" and "v" in tag][-1] release_version = "-".join(latest_rc_tag.split("-")[:-2]) print(release_version) -print(latest_tag,latest_rc_tag) +print(latest_tag, latest_rc_tag) data = { - "latest_tag":latest_tag, - "latest_rc_tag":latest_rc_tag[1:], - "release_version":release_version + "latest_tag": latest_tag, + "latest_rc_tag": latest_rc_tag[1:], + "release_version": release_version } print(data) -with open("tag_info.json","w") as f: - f.write(json.dumps(data)) \ No newline at end of file +with open("tag_info.json", "w") as f: + f.write(json.dumps(data))