Infer edge channel on --dev
This commit is contained in:
+19
-12
@@ -18,7 +18,7 @@ in Omarchy 3.8.x or run directly with curl | bash on older systems.
|
|||||||
Options:
|
Options:
|
||||||
-y, --yes Do not prompt before upgrading
|
-y, --yes Do not prompt before upgrading
|
||||||
--reboot Reboot automatically after a successful upgrade
|
--reboot Reboot automatically after a successful upgrade
|
||||||
--dev Use stop-gap packages from the [omarchy-dev] repo
|
--dev Use dev packages [omarchy-dev / omarchy-settings-dev] (uses edge channel)
|
||||||
--channel stable|rc|edge Override detected Omarchy package channel
|
--channel stable|rc|edge Override detected Omarchy package channel
|
||||||
--user USER User account to refresh after package install
|
--user USER User account to refresh after package install
|
||||||
-h, --help Show this help
|
-h, --help Show this help
|
||||||
@@ -52,6 +52,7 @@ valid_channel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
channel_override="${OMARCHY_UPGRADE_CHANNEL:-${OMARCHY_CHANNEL:-${OMARCHY_MIRROR:-}}}"
|
channel_override="${OMARCHY_UPGRADE_CHANNEL:-${OMARCHY_CHANNEL:-${OMARCHY_MIRROR:-}}}"
|
||||||
|
channel_override_cli=0
|
||||||
target_user="${OMARCHY_INSTALL_USER:-}"
|
target_user="${OMARCHY_INSTALL_USER:-}"
|
||||||
yes=0
|
yes=0
|
||||||
auto_reboot=0
|
auto_reboot=0
|
||||||
@@ -73,6 +74,7 @@ while (($#)); do
|
|||||||
;;
|
;;
|
||||||
--channel)
|
--channel)
|
||||||
channel_override="${2:-}"
|
channel_override="${2:-}"
|
||||||
|
channel_override_cli=1
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--user)
|
--user)
|
||||||
@@ -95,6 +97,18 @@ case "$use_dev_packages" in
|
|||||||
*) fail "Invalid OMARCHY_UPGRADE_DEV value '$use_dev_packages'. Use 1/0, true/false, or pass --dev." ;;
|
*) fail "Invalid OMARCHY_UPGRADE_DEV value '$use_dev_packages'. Use 1/0, true/false, or pass --dev." ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if (( use_dev_packages )); then
|
||||||
|
if (( channel_override_cli )); then
|
||||||
|
if ! valid_channel "$channel_override"; then
|
||||||
|
fail "Invalid channel '$channel_override'. Use stable, rc, or edge."
|
||||||
|
fi
|
||||||
|
if [[ $(normalize_channel "$channel_override") != edge ]]; then
|
||||||
|
fail "--dev uses the edge channel; remove --channel or pass --channel edge."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
channel_override=edge
|
||||||
|
fi
|
||||||
|
|
||||||
if ! command -v pacman >/dev/null 2>&1; then
|
if ! command -v pacman >/dev/null 2>&1; then
|
||||||
fail "This upgrade is only supported on Arch/Omarchy systems with pacman."
|
fail "This upgrade is only supported on Arch/Omarchy systems with pacman."
|
||||||
fi
|
fi
|
||||||
@@ -326,7 +340,7 @@ esac
|
|||||||
|
|
||||||
if (( ! yes )); then
|
if (( ! yes )); then
|
||||||
package_mode="production Omarchy packages"
|
package_mode="production Omarchy packages"
|
||||||
(( use_dev_packages )) && package_mode="stop-gap packages from [omarchy-dev]"
|
(( use_dev_packages )) && package_mode="dev packages [omarchy-dev / omarchy-settings-dev]"
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
@@ -387,9 +401,8 @@ configure_pacman_channel() {
|
|||||||
|
|
||||||
as_root cp -f /etc/pacman.conf "/etc/pacman.conf.omarchy-upgrade-to-4.$backup_suffix.bak"
|
as_root cp -f /etc/pacman.conf "/etc/pacman.conf.omarchy-upgrade-to-4.$backup_suffix.bak"
|
||||||
|
|
||||||
# Drop any stale [omarchy-dev] block every time. Re-add it only for the
|
# Drop any stale [omarchy-dev] block every time. Re-add it only for dev
|
||||||
# stop-gap dev package mode so normal upgrades resolve the real tagged
|
# package mode so normal upgrades resolve release packages from [omarchy].
|
||||||
# packages from [omarchy] once they exist.
|
|
||||||
local dev_server='https://share.heyoodle.com/omarchy/dev/$arch'
|
local dev_server='https://share.heyoodle.com/omarchy/dev/$arch'
|
||||||
local tmp
|
local tmp
|
||||||
|
|
||||||
@@ -553,9 +566,6 @@ migrate_1password_beta_package() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_omarchy_4_packages() {
|
install_omarchy_4_packages() {
|
||||||
# Until Omarchy 4 is tagged and published for real, --dev installs the
|
|
||||||
# stop-gap package names from [omarchy-dev]. They provide/conflict the real
|
|
||||||
# names so testers can later move to omarchy/omarchy-settings cleanly.
|
|
||||||
local omarchy_package=omarchy
|
local omarchy_package=omarchy
|
||||||
local settings_package=omarchy-settings
|
local settings_package=omarchy-settings
|
||||||
if (( use_dev_packages )); then
|
if (( use_dev_packages )); then
|
||||||
@@ -563,21 +573,18 @@ install_omarchy_4_packages() {
|
|||||||
settings_package=omarchy-settings-dev
|
settings_package=omarchy-settings-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The bootloader stack (limine, snapper, etc.) is hard-depended by the
|
|
||||||
# Omarchy package, so it'll be pulled in automatically.
|
|
||||||
local core_packages=(
|
local core_packages=(
|
||||||
omarchy-keyring
|
omarchy-keyring
|
||||||
"$settings_package"
|
"$settings_package"
|
||||||
omarchy-nvim
|
omarchy-nvim
|
||||||
"$omarchy_package"
|
"$omarchy_package"
|
||||||
# checkupdates support for update tooling
|
|
||||||
fakeroot
|
fakeroot
|
||||||
pacman-contrib
|
pacman-contrib
|
||||||
)
|
)
|
||||||
local base_packages=()
|
local base_packages=()
|
||||||
|
|
||||||
log "Installing Omarchy 4 packages"
|
log "Installing Omarchy 4 packages"
|
||||||
(( use_dev_packages )) && log "Using stop-gap packages from [omarchy-dev]"
|
(( use_dev_packages )) && log "Using dev packages [omarchy-dev / omarchy-settings-dev]"
|
||||||
# --noconfirm answers "no" to conflict-removal prompts. --ask 4 preselects
|
# --noconfirm answers "no" to conflict-removal prompts. --ask 4 preselects
|
||||||
# removing the conflicting package, which is required for legacy packages like
|
# removing the conflicting package, which is required for legacy packages like
|
||||||
# ttf-jetbrains-mono-nerd -> ttf-jetbrains-mono-nerd-basic.
|
# ttf-jetbrains-mono-nerd -> ttf-jetbrains-mono-nerd-basic.
|
||||||
|
|||||||
Reference in New Issue
Block a user