Something went wrong. Try again.
Your music, beautifully tracked. All yours. (coming soon) teal.fm
teal-fm atproto
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263#!/bin/bash# scripts/update-lexicons.sh# Update script for ATProto lexicons from upstream
set -e
echo "Updating ATProto lexicons..."
# Check if we're in the right directoryif [ ! -f "package.json" ] || [ ! -d "vendor/atproto" ]; then echo "Error: This script must be run from the project root directory" echo "Make sure vendor/atproto submodule exists" exit 1fi
# Save current directoryPROJECT_ROOT=$(pwd)
# Update the submoduleecho "Fetching latest changes from atproto repository..."cd vendor/atproto
# Fetch latest changesgit fetch origin
# Get current commitCURRENT_COMMIT=$(git rev-parse HEAD)CURRENT_SHORT=$(git rev-parse --short HEAD)
# Get latest commit on mainLATEST_COMMIT=$(git rev-parse origin/main)LATEST_SHORT=$(git rev-parse --short origin/main)
if [ "$CURRENT_COMMIT" = "$LATEST_COMMIT" ]; then echo "Already up to date (${CURRENT_SHORT})" cd "$PROJECT_ROOT" exit 0fi
echo "Updating from ${CURRENT_SHORT} to ${LATEST_SHORT}..."
# Pull latest changesgit pull origin main
# Go back to project rootcd "$PROJECT_ROOT"
# Stage the submodule updategit add vendor/atproto
# Show what changedecho ""echo "Submodule updated successfully!"echo "Changes:"git diff --cached --submodule=log vendor/atproto
echo ""echo "To complete the update, commit the changes:"echo " git commit -m \"Update atproto lexicons to ${LATEST_SHORT}\""echo ""echo "Or to see what lexicon files changed:"echo " cd vendor/atproto && git log --oneline ${CURRENT_SHORT}..${LATEST_SHORT} -- lexicons/"