feat: add template drift check and cache management to deploy tooling #205
@ -56,6 +56,10 @@ while [[ $# -gt 0 ]]; do
|
||||
SYNC_TEMPLATES=true
|
||||
shift
|
||||
;;
|
||||
--*)
|
||||
echo -e "${RED}Unknown option: $1${NC}"
|
||||
usage
|
||||
;;
|
||||
*)
|
||||
COMMIT="$1"
|
||||
shift
|
||||
@ -93,7 +97,7 @@ check_templates() {
|
||||
local changed=()
|
||||
local missing_remote=()
|
||||
while IFS= read -r line; do
|
||||
local hash file
|
||||
local hash file remote_hash
|
||||
hash=$(echo "$line" | awk '{print $1}')
|
||||
file=$(echo "$line" | awk '{print $2}')
|
||||
remote_hash=$(echo "$remote_hashes" | awk -v f="$file" '$2 == f {print $1}')
|
||||
@ -131,14 +135,11 @@ check_templates() {
|
||||
check_templates
|
||||
|
||||
# --- Cached image report ---
|
||||
declare -A API_CONTAINER=([dev]="dev_pd_database" [prod]="pd_api")
|
||||
|
||||
report_cache() {
|
||||
local host="${DEPLOY_HOST[$ENV]}"
|
||||
local container
|
||||
if [[ "$ENV" == "dev" ]]; then
|
||||
container="dev_pd_database"
|
||||
else
|
||||
container="pd_api"
|
||||
fi
|
||||
local container="${API_CONTAINER[$ENV]}"
|
||||
|
||||
echo -e "${CYAN}Cached card images on ${host} (${container}):${NC}"
|
||||
ssh "$host" "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user