bombsquad-plugin-manager/test/get_latest.py

14 lines
311 B
Python
Raw Permalink Normal View History

2024-04-20 04:26:43 +05:30
import json
def get_latest():
2024-04-20 09:06:50 +05:30
"""Get latest version entry from index.json"""
2024-04-20 04:26:43 +05:30
with open('index.json', 'r') as file:
content = json.loads(file.read())
latest_version = list(content["versions"].keys())[0]
return latest_version
if __name__ == "__main__":
print(get_latest())