Skip to content

Commit b9ecc06

Browse files
authored
Merge pull request #161 from infosiftr/latest-1
Switch from explicit "stable" / "unstable" to "latest" and "latest-1"…
2 parents fc0294a + c7a767e commit b9ecc06

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)