Files
ixoblakp 22938b01ca refactor: move OpenCode artifacts under opencode/
arka/public is the dump for all Arka downloads. Keep a root stub so the
old installer URL still works. Document in-OpenCode bash install.
2026-08-27 17:56:04 +03:00

28 lines
891 B
Bash
Executable File

#!/usr/bin/env bash
# Daily catalog refresh for arka/public/opencode.
# Runs on core at 05:00 Europe/Moscow.
set -euo pipefail
# this file lives at opencode/scripts/cron-sync.sh → repo root is ../..
REPO="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$REPO"
export GIT_SSH_COMMAND="${GIT_SSH_COMMAND:-ssh -i /root/.ssh/arka_public_catalog -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new}"
git fetch origin main
git checkout -q main
git reset --hard origin/main
python3 opencode/scripts/sync-catalog.py
if git diff --quiet -- opencode/catalog.json; then
printf '%s no catalog change\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
exit 0
fi
git add opencode/catalog.json
git -c user.name='arka-catalog-bot' -c user.email='noreply@arka-ai.ru' \
commit -m "chore(catalog): refresh $(date -u +%Y-%m-%d)"
git push origin main
printf '%s catalog pushed\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)"