From 56364e62b4c05f7845153e9dd5039034c446af02 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Thu, 26 Mar 2026 08:00:46 -0400 Subject: [PATCH] config: update bin/sync-up.sh,channel_directory.json --- bin/sync-up.sh | 28 +++++++++++++--------------- channel_directory.json | 2 +- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/bin/sync-up.sh b/bin/sync-up.sh index a6ce778b..e3753387 100755 --- a/bin/sync-up.sh +++ b/bin/sync-up.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # sync-up.sh — Push live ~/.hermes config changes UP to timmy-config repo. # The harness is the source. The repo is the record. -# Run periodically or after significant config changes. +# Only commits when there are REAL changes (not empty syncs). set -euo pipefail @@ -12,31 +12,29 @@ log() { echo "[sync-up] $*"; } # === Copy live config into repo === cp "$HERMES_HOME/config.yaml" "$REPO_DIR/config.yaml" -log "config.yaml" -# === Playbooks === for f in "$HERMES_HOME"/playbooks/*.yaml; do [ -f "$f" ] && cp "$f" "$REPO_DIR/playbooks/" done -log "playbooks/" -# === Skins === for f in "$HERMES_HOME"/skins/*; do [ -f "$f" ] && cp "$f" "$REPO_DIR/skins/" done -log "skins/" -# === Channel directory === [ -f "$HERMES_HOME/channel_directory.json" ] && cp "$HERMES_HOME/channel_directory.json" "$REPO_DIR/" -log "channel_directory.json" -# === Commit and push if there are changes === +# === Only commit if there are real diffs === cd "$REPO_DIR" -if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "sync: live config from ~/.hermes $(date +%Y-%m-%d_%H:%M)" - git push - log "Pushed changes to Gitea." -else +git add -A + +# Check if there are staged changes +if git diff --cached --quiet; then log "No changes to sync." + exit 0 fi + +# Build a meaningful commit message from what actually changed +CHANGED=$(git diff --cached --name-only | tr '\n' ', ' | sed 's/,$//') +git commit -m "config: update ${CHANGED}" +git push +log "Pushed: ${CHANGED}" diff --git a/channel_directory.json b/channel_directory.json index 2a10cd4b..81f46c06 100644 --- a/channel_directory.json +++ b/channel_directory.json @@ -1,5 +1,5 @@ { - "updated_at": "2026-03-26T06:59:37.300889", + "updated_at": "2026-03-26T08:00:22.606401", "platforms": { "discord": [ {