chore: fix shellcheck findings across migration scripts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# shellcheck disable=SC2329
|
||||
|
||||
# =============================================================================
|
||||
# phase8_post_check.sh — Verify Phase 8 (Cutover) succeeded
|
||||
@@ -41,6 +42,7 @@ run_check "HTTPS returns 200 at https://${GITEA_DOMAIN}" \
|
||||
curl -sf -o /dev/null "https://${GITEA_DOMAIN}/api/v1/version"
|
||||
|
||||
# Check 2: HTTP redirects to HTTPS (returns 301)
|
||||
# shellcheck disable=SC2329
|
||||
check_redirect() {
|
||||
local http_code
|
||||
http_code=$(curl -sI -o /dev/null -w "%{http_code}" "http://${GITEA_DOMAIN}/")
|
||||
@@ -49,6 +51,7 @@ check_redirect() {
|
||||
run_check "HTTP → HTTPS redirect (301)" check_redirect
|
||||
|
||||
# Check 3: SSL certificate is valid (not self-signed)
|
||||
# shellcheck disable=SC2329
|
||||
check_ssl_cert() {
|
||||
# Verify openssl can connect and the cert is issued by a recognized CA
|
||||
local issuer
|
||||
@@ -66,6 +69,7 @@ done
|
||||
|
||||
# Check 5: GitHub repos are marked as offsite backup
|
||||
for repo in "${REPOS[@]}"; do
|
||||
# shellcheck disable=SC2329
|
||||
check_mirror_marked() {
|
||||
local desc
|
||||
desc=$(github_api GET "/repos/${GITHUB_USERNAME}/$1" | jq -r '.description // ""')
|
||||
|
||||
Reference in New Issue
Block a user