Drop the legacy build-host names
OMARCHY_BUILD_HOST and .build-host were carried as fallbacks through the rename. Nothing in this checkout ever set either one, so they were a second name for a setting that has only one real name. Resolution is now --host, OMARCHY_REPO_HOST, .repo-host. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
34326295e9
commit
c2305c52d1
@@ -33,5 +33,4 @@ pkgbuilds/symfony-cli/symfony*
|
|||||||
!pkgbuilds/symfony-cli/symfony-cli.install
|
!pkgbuilds/symfony-cli/symfony-cli.install
|
||||||
pkgbuilds/yay/yay/
|
pkgbuilds/yay/yay/
|
||||||
.srcdest/
|
.srcdest/
|
||||||
.build-host
|
|
||||||
.repo-host
|
.repo-host
|
||||||
|
|||||||
@@ -212,9 +212,8 @@ need no secrets.
|
|||||||
|
|
||||||
The host comes from `--host`, `$OMARCHY_REPO_HOST`, then `.repo-host`. One
|
The host comes from `--host`, `$OMARCHY_REPO_HOST`, then `.repo-host`. One
|
||||||
machine both serves pkgs.omarchy.org and runs the scheduled builds, so the
|
machine both serves pkgs.omarchy.org and runs the scheduled builds, so the
|
||||||
setting is named for the repository rather than for building, which now happens
|
setting is named for the repository rather than for building, which happens
|
||||||
wherever you like. `OMARCHY_BUILD_HOST` and `.build-host` are the previous names
|
wherever you like.
|
||||||
and still work.
|
|
||||||
|
|
||||||
Note that `.repo-host` also arms the automatic build trigger in
|
Note that `.repo-host` also arms the automatic build trigger in
|
||||||
`bin/omarchy-pkgs release`; pass `--host` or set `OMARCHY_REPO_HOST` to keep the
|
`bin/omarchy-pkgs release`; pass `--host` or set `OMARCHY_REPO_HOST` to keep the
|
||||||
@@ -322,8 +321,7 @@ stable — promotion is always this explicit step.
|
|||||||
|
|
||||||
After pushing, the command triggers the build host over ssh when
|
After pushing, the command triggers the build host over ssh when
|
||||||
`OMARCHY_REPO_HOST` is set (env var, or a hostname in the git-ignored
|
`OMARCHY_REPO_HOST` is set (env var, or a hostname in the git-ignored
|
||||||
`.repo-host` file; `OMARCHY_BUILD_HOST` and `.build-host` still work). Without
|
`.repo-host` file). Without it, the 6-hourly auto-release timer picks up the
|
||||||
it, the 6-hourly auto-release timer picks up the
|
|
||||||
change on its own.
|
change on its own.
|
||||||
|
|
||||||
## Directory Structure
|
## Directory Structure
|
||||||
|
|||||||
+10
-20
@@ -1,11 +1,9 @@
|
|||||||
# Resolving the Omarchy repository host
|
# Resolving the Omarchy repository host
|
||||||
#
|
#
|
||||||
# One machine both hosts pkgs.omarchy.org and runs the scheduled builds. The
|
# One machine both serves pkgs.omarchy.org and runs the scheduled builds. The
|
||||||
# commands that reach it are doing repository work — uploading artifacts,
|
# commands that reach it are doing repository work — uploading artifacts,
|
||||||
# signing, publishing — so the setting is named for the repository rather than
|
# signing, publishing — so the setting is named for the repository rather than
|
||||||
# for building, which now happens on whatever machine the operator prefers.
|
# for building, which happens on whatever machine the operator prefers.
|
||||||
#
|
|
||||||
# OMARCHY_BUILD_HOST and .build-host are the previous names and still work.
|
|
||||||
|
|
||||||
# Usage: resolve_repo_host [explicit-host]
|
# Usage: resolve_repo_host [explicit-host]
|
||||||
# Prints the host, or nothing when none is configured.
|
# Prints the host, or nothing when none is configured.
|
||||||
@@ -22,23 +20,15 @@ resolve_repo_host() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${OMARCHY_BUILD_HOST:-}" ]]; then
|
if [[ -f "$BUILD_ROOT/.repo-host" ]]; then
|
||||||
echo "$OMARCHY_BUILD_HOST"
|
# Ignore blank lines and comments so the file can be annotated.
|
||||||
return 0
|
local value
|
||||||
fi
|
value=$(grep -vE '^\s*(#|$)' "$BUILD_ROOT/.repo-host" | head -1 | tr -d '[:space:]')
|
||||||
|
if [[ -n "$value" ]]; then
|
||||||
local file
|
echo "$value"
|
||||||
for file in "$BUILD_ROOT/.repo-host" "$BUILD_ROOT/.build-host"; do
|
return 0
|
||||||
if [[ -f "$file" ]]; then
|
|
||||||
# Ignore blank lines and comments so the file can be annotated.
|
|
||||||
local value
|
|
||||||
value=$(grep -vE '^\s*(#|$)' "$file" | head -1 | tr -d '[:space:]')
|
|
||||||
if [[ -n "$value" ]]; then
|
|
||||||
echo "$value"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user