aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-release
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-19 11:27:38 -0600
committerCraig Jennings <c@cjennings.net>2026-01-19 11:27:38 -0600
commit62107e4f24203b6f5607bb6cb5e40fe85c5beaae (patch)
treee7704f84abb3a9b8b346945542fab7d0209b8c33 /scripts/build-release
parentcb2db4e8a6e7ebb6f3a9c2f743543fdff54f576e (diff)
downloadarchangel-62107e4f24203b6f5607bb6cb5e40fe85c5beaae.tar.gz
archangel-62107e4f24203b6f5607bb6cb5e40fe85c5beaae.zip
Add --yes flag for fully automated distribution
New --yes/-y flag skips the dd confirmation prompt, allowing build-release to run completely unattended for CI/CD workflows. The ARCHZFS label on the drive is sufficient safety - if it has that label, it was created by this process and is the intended target.
Diffstat (limited to 'scripts/build-release')
-rwxr-xr-xscripts/build-release21
1 files changed, 14 insertions, 7 deletions
diff --git a/scripts/build-release b/scripts/build-release
index c5ec921..00f66ce 100755
--- a/scripts/build-release
+++ b/scripts/build-release
@@ -46,16 +46,19 @@ step() { echo -e "\n${CYAN}=== $1 ===${NC}\n"; }
# Parse arguments
SKIP_BUILD=false
SKIP_TEST=false
+AUTO_CONFIRM=false
while [[ $# -gt 0 ]]; do
case $1 in
--skip-build) SKIP_BUILD=true; shift ;;
--skip-test) SKIP_TEST=true; shift ;;
+ --yes|-y) AUTO_CONFIRM=true; shift ;;
-h|--help)
- echo "Usage: $0 [--skip-build] [--skip-test]"
+ echo "Usage: $0 [--skip-build] [--skip-test] [--yes]"
echo ""
echo "Options:"
echo " --skip-build Skip ISO build, distribute existing ISO"
echo " --skip-test Skip QEMU sanity test"
+ echo " --yes, -y Auto-confirm dd to ARCHZFS drive (no prompt)"
exit 0
;;
*) error "Unknown option: $1" ;;
@@ -234,17 +237,21 @@ distribute_archzfs_usb() {
return 0
fi
- # Confirm before writing
+ # Confirm before writing (unless --yes flag)
echo ""
warn "About to write ISO to $ARCHZFS_DISK"
- warn "This will ERASE ALL DATA on the drive!"
lsblk "$ARCHZFS_DISK"
echo ""
- read -p "Type 'yes' to confirm: " confirm
- if [[ "$confirm" != "yes" ]]; then
- warn "Skipping USB write"
- return 0
+ if ! $AUTO_CONFIRM; then
+ warn "This will ERASE ALL DATA on the drive!"
+ read -p "Type 'yes' to confirm: " confirm
+ if [[ "$confirm" != "yes" ]]; then
+ warn "Skipping USB write"
+ return 0
+ fi
+ else
+ info "Auto-confirmed (--yes flag)"
fi
# Unmount any mounted partitions