diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-26 17:36:40 +0200 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-26 17:36:40 +0200 |
| commit | 2ac35d765835a4027ab8e6ffa599efd61647baa3 (patch) | |
| tree | 0bf01b0b9f3f47656bd638e51b2967fbc99f6dbb /_scripts | |
| parent | 353df96a7979fc51a802d6c5b48d50c8142ddd4c (diff) | |
| download | alpine-mksite-2ac35d765835a4027ab8e6ffa599efd61647baa3.tar.bz2 alpine-mksite-2ac35d765835a4027ab8e6ffa599efd61647baa3.tar.xz | |
generate_releases: rely on the description in yaml
remove the vanilla flavor as it no longer exists.
The first listed flavors are standard, extended and netboot, the rest
wil come in random order.
Diffstat (limited to '_scripts')
| -rw-r--r-- | _scripts/generate_releases.lua | 73 |
1 files changed, 13 insertions, 60 deletions
diff --git a/_scripts/generate_releases.lua b/_scripts/generate_releases.lua index 6ef5387..dbb2271 100644 --- a/_scripts/generate_releases.lua +++ b/_scripts/generate_releases.lua @@ -5,67 +5,18 @@ lyaml = require("lyaml") url_prefix="https://nl.alpinelinux.org/alpine" t = { flavors={} } -flavor_def = { - { - flavor = "alpine-standard", - title = "Standard", - desc = "Alpine as it was intended.\n".. - "Just enough to get you started.\n".. - "Network connection required.", - }, { - flavor = "alpine-extended", - title = "Extended", - desc = "Most common used packages included.\n".. - "Suitable for routers and servers.\n".. - "Runs from RAM.", - }, { - flavor = "alpine-vanilla", - title = "Vanilla", - desc = "Includes a vanilla kernel.\n".. - "Does not include grsec patch set.\n".. - "Suitable for debugging.", - }, { - flavor = "alpine-virt", - title = "Virtual", - desc = "Similar to standard.\n".. - "Slimmed down kernel.\n".. - "Optimized for virtual systems.", - }, { - flavor = "alpine-xen", - title = "Xen", - desc = "Built-in support for Xen Hypervisor.\n".. - "Includes packages targed at Xen usage.\n".. - "Includes grsec kernel.", - }, { - flavor = "alpine-minirootfs", - title = "Mini root filesystem", - desc = "Minimal root filesystem.\n".. - "For use in containers.\n".. - "and minimal chroots" - }, { - flavor = "alpine-rpi", - title = "Raspberry Pi", - desc = "Includes Raspberry Pi kernel.\n".. - "Does not include grsec patchset.\n", - "And much more...", - }, { - flavor = "alpine-uboot", - title = "Generic ARM", - desc = "Has default ARM kernel.\n".. - "Includes the uboot bootloader.\n".. - "Supports armhf and aarch64.", - } +-- list those flavors first, the rest will be random +flavor_index = { + ["alpine-standard"] = 1, + ["alpine-extended"] = 2, + ["alpine-netboot"] = 3, } +numflavors = 3 -- number of different colors for flavors in CSS num_colors = 7 -flavor_index = {} -for i,f in pairs(flavor_def) do - flavor_index[f.flavor] = i -end - for i = 1,#arg do local f = assert(io.open(arg[i])) @@ -81,21 +32,23 @@ for i = 1,#arg do v.size_mb=math.floor(v.size/(1024*1024)) local n = flavor_index[v.flavor] + if n == nil then + numflavors = numflavors + 1 + n = numflavors + flavor_index[v.flavor] = n + end local flavor = t.flavors[n] if flavor == nil then - local def = flavor_def[n] or {title="", desc=""} flavor = { archs = {}, - flavor_title = v.title or def.title, - flavor_desc = v.desc or def.desc, + flavor_title = v.title or "", + flavor_desc = v.desc or "", flavor_name = string.lower(v.flavor), flavor_color = (flavor_index[v.flavor]-1) % num_colors } t.flavors[n] = flavor end --- flavor[v.arch] = v table.insert(flavor.archs, v) --- t[v.flavor] = flavor end end |
