Consolidate more helpers
This commit is contained in:
@@ -5,7 +5,8 @@ set -e
|
||||
|
||||
# Source common functions
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/docker-helpers.sh"
|
||||
|
||||
ARCH=${ARCH:-x86_64}
|
||||
|
||||
@@ -89,12 +90,8 @@ build_docker_image "$BUILD_DIR"
|
||||
print_info "Running AUR package build..."
|
||||
|
||||
# Ensure output directories are writable by container user
|
||||
# The container runs as 'builder' user, so we need to make output writable
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
chmod -R 777 "$BUILD_OUTPUT_DIR" "$FINAL_OUTPUT_DIR"
|
||||
else
|
||||
sudo chown -R $(id -u):$(id -g) "$BUILD_OUTPUT_DIR" "$FINAL_OUTPUT_DIR" 2>/dev/null || chmod -R 777 "$BUILD_OUTPUT_DIR" "$FINAL_OUTPUT_DIR"
|
||||
fi
|
||||
make_dir_writable "$BUILD_OUTPUT_DIR"
|
||||
make_dir_writable "$FINAL_OUTPUT_DIR"
|
||||
|
||||
# Build Docker arguments
|
||||
DOCKER_ARGS=(
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ set -e
|
||||
|
||||
# Source common functions
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
|
||||
# Repository configuration
|
||||
ARCH=${ARCH:-x86_64}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
set -e
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
|
||||
ARCH=${ARCH:-x86_64}
|
||||
BUILD_OUTPUT_DIR="$BUILD_ROOT/build-output/$ARCH"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
set -e
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
|
||||
ARCH=${ARCH:-x86_64}
|
||||
SYNC_REMOTE=""
|
||||
|
||||
+3
-6
@@ -2,7 +2,8 @@
|
||||
set -e
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/docker-helpers.sh"
|
||||
|
||||
ARCH=${ARCH:-x86_64}
|
||||
REPO_DIR="$BUILD_ROOT/pkgs.omarchy.org/$ARCH"
|
||||
@@ -60,11 +61,7 @@ build_docker_image "$BUILD_DIR"
|
||||
print_info "Removing package..."
|
||||
|
||||
# Ensure directory is writable by container user
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
chmod -R 777 "$REPO_DIR"
|
||||
else
|
||||
sudo chown -R $(id -u):$(id -g) "$REPO_DIR" 2>/dev/null || chmod -R 777 "$REPO_DIR"
|
||||
fi
|
||||
make_dir_writable "$REPO_DIR"
|
||||
|
||||
# Run the removal script in Docker
|
||||
docker run --rm \
|
||||
|
||||
@@ -9,7 +9,7 @@ SCRIPT_DIR=$(realpath "${BASH_SOURCE[0]%/*}")
|
||||
BUILD_ROOT=$(realpath "$SCRIPT_DIR/..")
|
||||
|
||||
# Source common functions
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
|
||||
# Setup logging with timestamps
|
||||
LOG_DIR="$BUILD_ROOT/logs"
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
set -e
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/docker-helpers.sh"
|
||||
|
||||
ARCH=${ARCH:-x86_64}
|
||||
BUILD_OUTPUT_DIR="$BUILD_ROOT/build-output/$ARCH"
|
||||
@@ -66,11 +67,7 @@ build_docker_image "$BUILD_DIR"
|
||||
print_info "Running package signing..."
|
||||
|
||||
# Ensure output directory is writable by container user
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
chmod -R 777 "$BUILD_OUTPUT_DIR"
|
||||
else
|
||||
sudo chown -R $(id -u):$(id -g) "$BUILD_OUTPUT_DIR" 2>/dev/null || chmod -R 777 "$BUILD_OUTPUT_DIR"
|
||||
fi
|
||||
make_dir_writable "$BUILD_OUTPUT_DIR"
|
||||
|
||||
# Run the signing script in Docker
|
||||
docker run --rm \
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
|
||||
PKGBUILDS_DIR="$BUILD_ROOT/pkgbuilds"
|
||||
PACKAGES_FILE="$BUILD_ROOT/build/packages/omarchy-aur.packages"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# Source common functions
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
|
||||
# Default remote (production)
|
||||
DEFAULT_REMOTE="pkgs.omarchy.org:omarchy-pkgs"
|
||||
|
||||
+3
-6
@@ -6,7 +6,8 @@ set -e
|
||||
|
||||
# Source common functions
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/lib/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/docker-helpers.sh"
|
||||
|
||||
ARCH=${ARCH:-x86_64}
|
||||
BUILD_DIR="$BUILD_ROOT/build"
|
||||
@@ -27,11 +28,7 @@ update_database() {
|
||||
fi
|
||||
|
||||
# Make output directory writable for container
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
chmod -R 777 "$ARCH_DIR"
|
||||
else
|
||||
sudo chown -R $(id -u):$(id -g) "$ARCH_DIR" 2>/dev/null || chmod -R 777 "$ARCH_DIR"
|
||||
fi
|
||||
make_dir_writable "$ARCH_DIR"
|
||||
|
||||
# Build Docker image
|
||||
build_docker_image "$BUILD_DIR"
|
||||
|
||||
Reference in New Issue
Block a user