Verified Commit 5a681fd3 authored by hashworks's avatar hashworks
Browse files

Add date and build number as VERSION_ID to /etc/os-release

Resolves #68
parent 64d4832a
Pipeline #20802 passed with stages
in 3 minutes and 2 seconds
......@@ -227,6 +227,7 @@ release:
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_DOWNLOAD|ROOTFS=\"\$(curl -sOJL -w \"%{filename_effective}\" \"${package_url}\")\"|" output/Dockerfile.${group}
sed -i "s|TEMPLATE_ROOTFS_HASH|$(cat output/${group}.tar.zst.SHA256)|" output/Dockerfile.${group}
sed -i "s|TEMPLATE_ROOTFS_VERSION|${BUILD_VERSION}|" output/Dockerfile.${group}
done
- >
curl -sSf --request POST -o commit-response.json
......
......@@ -23,7 +23,8 @@ RUN TEMPLATE_ROOTFS_DOWNLOAD && \
FROM scratch AS root
COPY --from=verify /rootfs/ /
RUN ldconfig
RUN ldconfig && \
sed -i '/BUILD_ID/a VERSION_ID=TEMPLATE_VERSION_ID' /etc/os-release
ENV LANG=en_US.UTF-8
CMD ["/usr/bin/bash"]
......@@ -42,6 +42,7 @@ define dockerfile
-e "s|TEMPLATE_ROOTFS_RELEASE_URL|Local build|" \
-e "s|TEMPLATE_ROOTFS_DOWNLOAD|ROOTFS=\"$(1).tar.zst\"|" \
-e "s|TEMPLATE_ROOTFS_HASH|$$(cat $(OUTPUTDIR)/$(1).tar.zst.SHA256)|" \
-e "s|TEMPLATE_VERSION_ID|dev|" \
Dockerfile.template > $(OUTPUTDIR)/Dockerfile.$(1)
endef
......
Supports Markdown
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