Yank out the online builder option

Offline is the way
This commit is contained in:
David Heinemeier Hansson committed 2025-09-13 18:23:31 +02:00
1 parent 6165c8935b
commit 2427a177f5
3 files changed
+18 -54

No files matched your search

+1 -11
View File
@@ -4,18 +4,9 @@
set -e
# Parse command line arguments
BUILD_MODE="offline"
NO_CACHE=""
while [[ $# -gt 0 ]]; do
case $1 in
--online)
BUILD_MODE="online"
shift
;;
--offline)
BUILD_MODE="offline"
shift
;;
--no-cache)
NO_CACHE=1
shift
@@ -56,7 +47,6 @@ DOCKER_ARGS=(
-e "OMARCHY_INSTALLER_REPO=$OMARCHY_INSTALLER_REPO"
-e "OMARCHY_INSTALLER_REF=$OMARCHY_INSTALLER_REF"
-e "OMARCHY_INSTALLER_URL=$OMARCHY_INSTALLER_URL"
-e "OMARCHY_BUILD_MODE=$BUILD_MODE"
-v "$BUILD_RELEASE_PATH/:/out/"
-v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro"
-v "$BUILD_ROOT/archiso:/archiso:ro"
@@ -71,7 +61,7 @@ fi
# Mount the build cache directory where packages are downloaded for the offline repo
# Only applicable for offline builds and when --no-cache is not specified
if [[ "$BUILD_MODE" == "offline" && -z "$NO_CACHE" ]]; then
if [[ -z "$NO_CACHE" ]]; then
# using a dated dir on the host to refresh daily if building multiple times
BUILD_DATE=$(date +%Y-%m-%d)
OFFLINE_REPO_BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
+15 -34
View File
@@ -2,9 +2,6 @@
set -e
# Build mode: offline (default) or online │ │
OMARCHY_BUILD_MODE="${OMARCHY_BUILD_MODE:-offline}"
# Note that these are packages installed to the Arch container
# used to build the ISO.
pacman-key --init
@@ -108,47 +105,31 @@ mkdir -p "$build_cache_dir/airootfs/root"
curl -fsSL -o "$build_cache_dir/airootfs/root/configurator" \
"https://raw.githubusercontent.com/$OMARCHY_CONFIGURATOR_REPO/$OMARCHY_CONFIGURATOR_REF/configurator"
if [ "$OMARCHY_BUILD_MODE" = "online" ]; then
echo "$OMARCHY_INSTALLER_REPO" >$build_cache_dir/airootfs/root/omarchy_installer_repo.txt
echo "$OMARCHY_INSTALLER_REF" >$build_cache_dir/airootfs/root/omarchy_installer_ref.txt
echo "$OMARCHY_INSTALLER_URL" >$build_cache_dir/airootfs/root/omarchy_installer_url.txt
echo "online" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt
else
echo "offline" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt
fi
# Add our additional packages to packages.x86_64
printf '%s\n' "${arch_packages[@]}" >>"$build_cache_dir/packages.x86_64"
if [ "$OMARCHY_BUILD_MODE" = "offline" ]; then
prepare_offline_mirror
prepare_offline_mirror
# Download Ruby tarball if not already cached
ruby_tarball="ruby-3.4.5-rails-8.0.2.1-x86_64.tar.gz"
if [ ! -f "$offline_ruby_dir/$ruby_tarball" ]; then
echo "Downloading Ruby tarball..."
curl -fsSL -o "$offline_ruby_dir/$ruby_tarball" \
"https://pkgs.omarchy.org/ruby/$ruby_tarball"
else
echo "Ruby tarball already cached, skipping download"
fi
# Create a symlink to the offline mirror instead of duplicating it.
# mkarchiso needs packages at /var/cache/omarchy/mirror/offline in the container,
# but they're actually in $build_cache_dir/airootfs/var/cache/omarchy/mirror/offline
mkdir -p /var/cache/omarchy/mirror
ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline"
# Download Ruby tarball if not already cached
ruby_tarball="ruby-3.4.5-rails-8.0.2.1-x86_64.tar.gz"
if [ ! -f "$offline_ruby_dir/$ruby_tarball" ]; then
echo "Downloading Ruby tarball..."
curl -fsSL -o "$offline_ruby_dir/$ruby_tarball" \
"https://pkgs.omarchy.org/ruby/$ruby_tarball"
else
echo "Ruby tarball already cached, skipping download"
fi
# Create a symlink to the offline mirror instead of duplicating it.
# mkarchiso needs packages at /var/cache/omarchy/mirror/offline in the container,
# but they're actually in $build_cache_dir/airootfs/var/cache/omarchy/mirror/offline
mkdir -p /var/cache/omarchy/mirror
ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline"
# Install Python packages for the installer into the ISO
# file system.
pip install "${python_packages[@]}"
if [ "$OMARCHY_BUILD_MODE" = "online" ]; then
# Copy the online version so we use it for build and ISO boot
cp $build_cache_dir/pacman-online.conf $build_cache_dir/pacman.conf
fi
# Copy the pacman.conf to the ISO's /etc directory so the live environment uses our
# same config when booted
cp $build_cache_dir/pacman.conf "$build_cache_dir/airootfs/etc/pacman.conf"
+2 -9
View File
@@ -28,14 +28,6 @@ set_tokyo_night_colors() {
fi
}
run_configurator() {
if [ "${OMARCHY_INSTALL_MODE:-offline}" = "online" ]; then
./configurator
else
NETWORK_NOT_NEEDED=true ./configurator
fi
}
install_base_system() {
# Initialize and populate the keyring
pacman-key --init
@@ -118,13 +110,14 @@ if [[ $(tty) == "/dev/tty1" ]]; then
source "$OMARCHY_INSTALL/helpers/all.sh"
set_tokyo_night_colors
run_configurator
NETWORK_NOT_NEEDED=true ./configurator
# Get username from installer config for reliable error recovery
export OMARCHY_USER="$(jq -r '.users[0].username' user_credentials.json)"
clear_logo
gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing Omarchy..."
echo
touch "$OMARCHY_INSTALL_LOG_FILE"