mirror of
https://github.com/kou029w/yama.git
synced 2025-01-18 16:08:11 +00:00
12 lines
319 B
Python
Executable file
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)
|