aurora/scripts/build-iso.sh
m2 6b38313476
feat(dev): improve just commands (#1297)
Co-authored-by: Jorge O. Castro <jorge.castro@gmail.com>
2024-05-15 10:26:16 -04:00

40 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/bash
#shellcheck disable=SC2154
if [[ -z ${project_root} ]]; then
project_root=$(git rev-parse --show-toplevel)
fi
if [[ -z ${git_branch} ]]; then
git_branch=$(git branch --show-current)
fi
# Common Build ISO
# shellcheck disable=SC1091
. "${project_root}/scripts/common-build-iso.sh"
if [[ ${container_mgr} =~ "podman" ]]; then
api_socket=/run/podman/podman.sock
elif [[ ${container_mgr} =~ "docker" ]]; then
api_socket=/var/run/docker.sock
fi
# Make ISO
${container_mgr} run --rm --privileged \
--volume "${api_socket}":/var/run/docker.sock \
--volume "${workspace}"/scripts/files/build-iso-makefile-patch:/build-container-installer/container/Makefile \
--volume "${workspace}/${flatpak_dir_shortname}":"/build-container-installer/${flatpak_dir_shortname}" \
--volume "${workspace}"/scripts/files/output:/build-container-installer/build \
ghcr.io/jasonn3/build-container-installer:latest \
ARCH="x86_64" \
ENABLE_CACHE_DNF="false" \
ENABLE_CACHE_SKOPEO="false" \
ENABLE_FLATPAK_DEPENDENCIES="false" \
ENROLLMENT_PASSWORD="ublue-os" \
FLATPAK_REMOTE_REFS_DIR="${flatpak_dir_shortname}" \
IMAGE_NAME="${tag}" \
IMAGE_REPO="localhost" \
IMAGE_TAG="${version}-${git_branch}" \
ISO_NAME="build/${tag}-${version}-${git_branch}.iso" \
SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \
VARIANT="${variant}" \
VERSION="${version}"