summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2025-12-16 12:26:57 +0100
committerRutherther <rutherther@ditigal.xyz>2025-12-23 09:16:05 +0100
commit2d4ed08662714ea46cfe0b41ca195d1ef845fd1b (patch)
tree3b352c59a9dc01a178db365783f891a63eb71892 /Makefile.am
parentab63e29e90aba4f10d477e76587d687a7bb6a27d (diff)
etc: release: Switch to Guile declaration of artifacts.
This is a rewrite of the bash commands for generation of guix binary tarballs and system images to Guile. I am expecting this will help us significantly with getting the same derivations locally and from Cuirass, instead of relying on images/tarball job specifications and trying to tweak it locally to have the same ones. Implements: #4347, #4348. * etc/teams/release/artifacts-manifest.scm: Make a manifest with release artifacts for all supported systems. * etc/teams/release/artifacts.scm: Collect artifacts for all supported systems into a union with proper names for the release artifacts. * Makefile.am (release): Use time-machine instead of pre-inst-env; Switch to building new artifacts.scm Change-Id: I71a6a27e6f315dd31b91c49e71dff2d09695c0dc Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am55
1 files changed, 13 insertions, 42 deletions
diff --git a/Makefile.am b/Makefile.am
index cca120baa1c..dabceddf2ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1177,49 +1177,20 @@ prepare-release: dist-with-updated-version all
@echo "Now push the resulting commit and run `make release`."
@echo
+# Make sure you've ran prepare-release prior to running release and pushed
+# the commit to Guix. It might be pushed to any branch, such as version-X.Y.Z.
release: all
-# Generate the binary release tarballs.
- rm -f $(BINARY_TARBALLS)
- $(MAKE) $(BINARY_TARBALLS)
- for system in $(SUPPORTED_SYSTEMS) ; do \
- mv "guix-binary.$$system.tar.xz" \
- "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
- done
-# Build 'current-guix' to speed things up for the next step.
- $(top_builddir)/pre-inst-env guix build \
- -e '((@ (gnu packages package-management) current-guix))' \
- $(call system_flags,$(GUIX_SYSTEM_INSTALLER_SYSTEMS)) \
- -v1 --no-grafts --fallback
-# Generate the ISO installation images.
- for system in $(GUIX_SYSTEM_INSTALLER_SYSTEMS) ; do \
- GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//'`" ; \
- image=`$(top_builddir)/pre-inst-env \
- guix system image -t iso9660 \
- --label="GUIX_$${system}_$(VERSION)" \
- --system=$$system --fallback \
- gnu/system/install.scm` ; \
- if [ ! -f "$$image" ] ; then \
- echo "failed to produce Guix installation image for $$system" >&2 ; \
- exit 1 ; \
- fi ; \
- cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \
- mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" \
- "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso" ; \
- done
-# Generate the VM images.
- for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
- GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//'`" ; \
- image=`$(top_builddir)/pre-inst-env \
- guix system image -t qcow2 $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
- --save-provenance \
- --system=$$system --fallback \
- gnu/system/examples/vm-image.tmpl` ; \
- if [ ! -f "$$image" ] ; then \
- echo "failed to produce Guix VM image for $$system" >&2 ; \
- exit 1 ; \
- fi ; \
- cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2"; \
- done
+# Build the artifacts for current commit.
+# Use time-machine for provenance.
+ $(MKDIR_P) "$(releasedir)"
+ @echo "Building guix inferior for current commit."
+ COMMIT="$$(git rev-parse HEAD)" && \
+ GUIX="$$(guix time-machine --commit=$$COMMIT)/bin/guix" && \
+ echo "Building artifacts for current commit: $$COMMIT." && \
+ ARTIFACTS="$$($$GUIX build --no-grafts \
+ -f ./etc/teams/release/artifacts.scm)" && \
+ echo "Artifacts built! Copying to $(releasedir)" && \
+ cp -f "$$ARTIFACTS"/* "$(releasedir)"
@echo
@echo "Congratulations! All the release files are now in $(releasedir)."
@echo