diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 49 |
1 files changed, 1 insertions, 48 deletions
@@ -104,8 +104,6 @@ run_live_build() { } post_build() { - local iso_candidates=() - log_step "post_build: preparing output directories" mkdir -p "$OUTPUT_DIR" "$AMD64_DIR" "$ARM64_DIR" @@ -113,18 +111,7 @@ post_build() { cd "$WORKDIR/config" log_step "post_build: finding live-build ISO" - mapfile -t iso_candidates < <(find . -maxdepth 1 -type f -name '*.iso' -print 2>/dev/null | sort) - - ISO="${iso_candidates[0]:-}" - - if [[ -z "$ISO" ]]; then - echo "ERROR: live-build did not produce an ISO" >> "$LOGFILE" - exit 1 - fi - - if (( ${#iso_candidates[@]} > 1 )); then - echo "ERROR: live-build produced multiple ISOs; refusing to guess which one to publish" >> "$LOGFILE" - printf ' %s\n' "${iso_candidates[@]}" >> "$LOGFILE" + if ! ISO=$(find_single_artifact "." "*.iso" "live-build ISO"); then exit 1 fi @@ -149,40 +136,6 @@ post_build() { log_step "Build complete" } -run_stats() { - echo "Regenerating stats (best effort)..." - - ensure_all_diffs # only depends on packages.txt - rebuild_metrics # skips missing safely - generate_index # renders whatever exists -} - -run_sync() { - echo "Starting sync to remote..." - - # Safety check - if [[ -z "${REMOTE_TARGET:-}" ]]; then - echo "ERROR: REMOTE_TARGET not set" - return 1 - fi - - if [[ ! -d "$OUTPUT_DIR" ]]; then - echo "ERROR: OUTPUT_DIR does not exist" - return 1 - fi - - # Perform rsync (mirror mode) - rsync -avz --delete "$OUTPUT_DIR/" "$REMOTE_TARGET" - - # Optional: verify after sync - verify_remote || { - echo "ERROR: Remote verification failed" - return 1 - } - - echo "Sync complete" -} - case "$MODE" in build) run_build |
