megabit-os/bin/version

14 lines
311 B
Text
Raw Normal View History

2021-09-05 15:41:38 +09:00
#!/usr/bin/env ruby
2020-07-21 01:06:43 +09:00
# 最新のバージョンを取得
# Usage: bin/version
2021-09-05 15:41:38 +09:00
require "open-uri"
require "yaml"
base = "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf"
url = "#{base}/latest-releases.yaml"
io = URI.open(url)
yaml = YAML.load(io)
version = yaml.dig(0, "version")
puts version