19 lines
843 B
Bash
19 lines
843 B
Bash
#!/usr/bin/env bash
|
|
# One owner for package sources across all stages. Payloads are never cached in the snapshot.
|
|
IOMATEX_PROJECT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
source "$IOMATEX_PROJECT_ROOT/offline/install-lock.sh"
|
|
if [[ ${EUID:-$(id -u)} -eq 0 ]]; then
|
|
[[ -f "$IOMATEX_PROJECT_ROOT/.iomatex-source.json" ]] || {
|
|
echo 'ERROR: initialize the lightweight Edge snapshot with install_iomatex_edge.sh first.' >&2
|
|
exit 1
|
|
}
|
|
python3 "$IOMATEX_PROJECT_ROOT/offline/git_delivery.py" activate "$IOMATEX_PROJECT_ROOT" || exit 1
|
|
fi
|
|
|
|
# Direct stage invocation also records success; the orchestrator records only after validation.
|
|
iomatex_record_stage() {
|
|
if [[ -z ${IOMATEX_INSTALLER_SELECTED_STAGES:-} ]]; then
|
|
python3 "$IOMATEX_PROJECT_ROOT/offline/stage_versions.py" record "$IOMATEX_PROJECT_ROOT" "$1"
|
|
fi
|
|
}
|