1
0
Fork 0
mirror of https://github.com/kou029w/yama.git synced 2025-01-18 16:08:11 +00:00
yama/bin/version
2022-05-31 00:03:34 +09:00

12 lines
319 B
Python
Executable file

#!/usr/bin/env python3
# 最新のバージョンを取得
# Usage: bin/version
from urllib.request import urlopen
import yaml
base = "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf"
url = f"{base}/latest-releases.yaml"
res = urlopen(url)
version = yaml.safe_load(res)[0]["version"]
print(version)