We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67888cc commit 7aa89a6Copy full SHA for 7aa89a6
lib/rootfs/data.rb
@@ -59,5 +59,31 @@ def from_gentoo_txt(str, keywords)
59
end
60
results
61
62
+
63
+ def from_alpine_yaml(str)
64
+ results = {}
65
+ flavors = str.split("-\n")
66
+ flavors.each do |flavor|
67
+ next unless flavor.include?("flavor: alpine-minirootfs")
68
69
+ lines = flavor.split("\n")
70
+ lines.each do |line|
71
+ line = line.delete_prefix(" ")
72
+ arr = line.split(":")
73
+ key = arr[0]
74
+ value = arr[1]
75
+ value = value.delete_prefix(" ") if value
76
77
+ results[:version] = value if key == "version"
78
+ results[:file] = value if key == "file"
79
+ if key == "sha256"
80
+ results[:sha256] = value
81
+ break
82
+ end
83
84
85
86
+ results
87
88
89
0 commit comments