Verified Commit 6b36cb98 authored by hashworks's avatar hashworks
Browse files

Provide a pretty release link in the Dockerfile

Resolves #49.
parent 67dddfbf
......@@ -202,6 +202,7 @@ release:
curl -sSf --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file output/${group}.tar.xz.SHA256 ${PACKAGE_REGISTRY_URL}/${group}-${BUILD_VERSION}.tar.xz.SHA256
sed "/TEMPLATE_ROOTFS_FILE/d" Dockerfile.template > output/Dockerfile.${group}
package_url=$(./ci/get-public-download-for-generic-package.sh ${group}-${BUILD_VERSION}.tar.xz)
sed -i "s|TEMPLATE_ROOTFS_RELEASE_URL|https://gitlab.archlinux.org/archlinux/archlinux-docker/-/releases/v${BUILD_VERSION}|" output/Dockerfile.${group}
sed -i "s|TEMPLATE_ROOTFS_URL|${package_url}|" output/Dockerfile.${group}
sed -i "s|TEMPLATE_ROOTFS_HASH|$(cat output/${group}.tar.xz.SHA256)|" output/Dockerfile.${group}
done
......
......@@ -12,6 +12,7 @@ FROM alpine:3.12 AS verify
COPY TEMPLATE_ROOTFS_FILE /
RUN apk add --no-cache curl bash
SHELL ["/bin/bash", "-c"]
# TEMPLATE_ROOTFS_RELEASE_URL
RUN ROOTFS="$(curl -sOJL --continue-at - -w "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \
sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \
mkdir /rootfs && \
......
......@@ -36,6 +36,7 @@ endef
define dockerfile
sed -e "s|TEMPLATE_ROOTFS_FILE|$(1).tar.xz|" \
-e "s|TEMPLATE_ROOTFS_RELEASE_URL|Local build|" \
-e "s|TEMPLATE_ROOTFS_URL|file:///$(1).tar.xz|" \
-e "s|TEMPLATE_ROOTFS_HASH|$$(cat $(OUTPUTDIR)/$(1).tar.xz.SHA256)|" \
Dockerfile.template > $(OUTPUTDIR)/Dockerfile.$(1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment