Skip to content

Commit c7a767e

Browse files
committed
Switch from explicit "stable" / "unstable" to "latest" and "latest-1" based on major.minor releases
This refactor will more closely match how BusyBox does releases -- they always call x.y.0 "unstable" but if it doesn't require any further fixes it never gets a .1 "stable" release (like 1.35 suffered from). Additionally, they don't seem to really ever have more than two simultaneous release branches (but if they did, we could trivially add a new `latest-2` and be covered): ```console $ wget -qO- 'https://busybox.net' | grep -ioE '[0-9a-zA-Z ]+ -- BusyBox [0-9.]+ [(](un)?stable[)]' | sed -re 's/(.*) -- (.*)/\2\t\1/' | column -ts$'\t' -R2 BusyBox 1.36.0 (unstable) 3 January 2023 BusyBox 1.35.0 (unstable) 26 December 2021 BusyBox 1.33.2 (stable) 30 November 2021 BusyBox 1.34.1 (stable) 30 September 2021 BusyBox 1.34.0 (unstable) 19 August 2021 BusyBox 1.33.1 (stable) 3 May 2021 BusyBox 1.32.1 (stable) 1 January 2021 BusyBox 1.33.0 (unstable) 29 December 2020 BusyBox 1.32.0 (unstable) 26 June 2020 BusyBox 1.31.1 (stable) 25 October 2019 BusyBox 1.31.0 (unstable) 10 June 2019 BusyBox 1.30.1 (stable) 14 February 2019 BusyBox 1.30.0 (unstable) 31 December 2018 BusyBox 1.29.3 (stable) 9 September 2018 BusyBox 1.29.2 (stable) 31 July 2018 BusyBox 1.29.1 (stable) 15 July 2018 BusyBox 1.29.0 (unstable) 1 July 2018 BusyBox 1.28.4 (stable) 22 May 2018 BusyBox 1.28.3 (stable) 3 April 2018 BusyBox 1.28.2 (stable) 26 March 2018 BusyBox 1.28.1 (stable) 15 February 2018 BusyBox 1.28.0 (unstable) 2 January 2018 BusyBox 1.27.2 (stable) 17 August 2017 BusyBox 1.27.1 (stable) 18 July 2017 BusyBox 1.27.0 (unstable) 3 July 2017 BusyBox 1.26.2 (stable) 10 January 2017 BusyBox 1.26.1 (stable) 2 January 2017 BusyBox 1.26.0 (unstable) 20 December 2016 BusyBox 1.25.1 (stable) 7 October 2016 BusyBox 1.25.0 (unstable) 22 June 2016 BusyBox 1.24.2 (stable) 24 March 2016 BusyBox 1.24.1 (stable) 24 October 2015 BusyBox 1.24.0 (unstable) 12 October 2015 BusyBox 1.23.2 (stable) 23 March 2015 BusyBox 1.23.1 (stable) 27 January 2015 BusyBox 1.23.0 (unstable) 23 December 2014 BusyBox 1.22.1 (stable) 20 January 2014 BusyBox 1.22.0 (unstable) 1 January 2014 BusyBox 1.21.1 (stable) 29 June 2013 BusyBox 1.21.0 (unstable) 21 January 2013 BusyBox 1.20.2 (stable) 2 July 2012 ```
1 parent fc0294a commit c7a767e

16 files changed

+73
-37
lines changed

Dockerfile-builder.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ ENV PATH /usr/src/buildroot/output/host/usr/bin:$PATH
224224
# sub 1024g/2C766641 2006-12-12
225225
RUN gpg --batch --keyserver keyserver.ubuntu.com --recv-keys C9E9416F76E610DBD09D040F47B70C55ACC9965B
226226

227+
# https://busybox.net: {{ .date }}
227228
ENV BUSYBOX_VERSION {{ .version }}
228229
ENV BUSYBOX_SHA256 {{ .sha256 }}
229230

generate-stackbrew-library.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ join() {
5151
echo "${out#$sep}"
5252
}
5353

54-
# if stable is 1.32.1 and unstable is 1.33.0, we want busybox:1.33 to point to unstable but busybox:1 (and busybox:latest) to point to stable
55-
# since stable always comes first, we'll just let it take all the tags it calculates, and use this to remove any overlap when we process unstable :)
54+
# make sure generic tags like "latest", "1", etc only get used once
5655
declare -A usedTags=()
5756
_tags() {
5857
local tag first=
@@ -75,20 +74,14 @@ _tags() {
7574
return 0
7675
}
7776

78-
allVersions=()
7977
for version; do
8078
export version
8179

8280
variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)"
8381
eval "variants=( $variants )"
8482

8583
fullVersion="$(jq -r '.[env.version].version' versions.json)"
86-
allVersions+=( "$fullVersion" )
87-
latestVersion="$(xargs -n1 <<<"${allVersions[*]}" | sort -V | tail -1)"
88-
if [ "$latestVersion" != "$fullVersion" ]; then
89-
# if "unstable" is older than "stable" (1.32.0 unstable vs 1.32.1 stable, for example), skip unstable
90-
continue
91-
fi
84+
stability="$(jq -r '.[env.version].stability' versions.json)"
9285

9386
versionAliases=()
9487
while [ "${fullVersion%.*}" != "$fullVersion" ]; do
@@ -97,7 +90,7 @@ for version; do
9790
done
9891
versionAliases+=(
9992
$fullVersion
100-
$version # "stable", "unstable"
93+
$stability # "stable", "unstable"
10194
latest
10295
)
10396

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)