summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/alpine.run5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/alpine.run b/templates/alpine.run
index bba82ad..b0d61fd 100755
--- a/templates/alpine.run
+++ b/templates/alpine.run
@@ -27,9 +27,10 @@ mkdir -p "$TWORKSPACE/distfiles" "$WORKSPACE/packages"
if [ ! -d "$ROOT" ]; then
# Prepare new root if there is none
- # TODO get latest uri from latest-releases.yml file
+ rootfs="$(curl http://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/latest-releases.yaml | \
+ yq -r 'map(select(.flavor == "alpine-minirootfs")) | .[0].file')"
echo_stage "Setting up new root"
- wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/alpine-minirootfs-3.9.0-$ARCH.tar.gz" -O alpine.tar.gz
+ wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/$rootfs" -O alpine.tar.gz
# TODO verify signature
gunzip alpine.tar.gz # tar is not able to change compressed files
tar -f alpine.tar --delete ./dev/null