mirror of
https://github.com/kou029w/megabit-os.git
synced 2025-01-18 16:07:58 +00:00
13 lines
311 B
Ruby
Executable file
13 lines
311 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
# 最新のバージョンを取得
|
|
# Usage: bin/version
|
|
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
|