Shell script run_retrieve.sh for non-LLM

gneration queries (returns only chunks), track
development notes and README.
This commit is contained in:
Eric Furst 2026-03-01 07:39:28 -05:00
commit eb9997326f
4 changed files with 1089 additions and 20 deletions

View file

@ -3,9 +3,11 @@
#
# Usage: ./deploy_public.sh ["optional commit message"]
#
# Checks out an orphan public branch, copies the public files from main,
# generates a public README (stripping private sections), commits, and
# force-pushes to origin. Then switches back to main.
# Checks out the public branch, updates it with public files from main,
# generates a public README (stripping private sections), commits if
# anything changed, and pushes to origin. Then switches back to main.
#
# On first run (no public branch exists), creates an orphan branch.
#
# E.M.F. February 2026
@ -50,12 +52,14 @@ MAIN_HEAD=$(git rev-parse --short HEAD)
echo "Deploying main ($MAIN_HEAD) -> $BRANCH..."
# Delete local public branch if it exists
git branch -D "$BRANCH" 2>/dev/null || true
# Create fresh orphan
git checkout --orphan "$BRANCH"
git rm -rf . >/dev/null 2>&1 || true
# Check out public branch, or create orphan if it doesn't exist yet
if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
git checkout "$BRANCH"
else
echo "No local $BRANCH branch — creating orphan..."
git checkout --orphan "$BRANCH"
git rm -rf . >/dev/null 2>&1 || true
fi
# Copy public files from main
for f in "${PUBLIC_FILES[@]}"; do
@ -74,22 +78,23 @@ awk '
skip { next }
/archived\// { next }
/saved_output\// { next }
/devlog\.txt/ { next }
/devlog\.md/ { next }
/\*\.ipynb/ { next }
{ print }
' README.md > README.tmp && mv README.tmp README.md
# Stage only the public files (not untracked files on disk)
git add "${PUBLIC_FILES[@]}" README.md
git commit -m "$COMMIT_MSG
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
# Push
git push --force "$REMOTE" "$BRANCH"
# Commit only if there are changes
if git diff --cached --quiet; then
echo "No changes to deploy."
else
git commit -m "$COMMIT_MSG"
git push "$REMOTE" "$BRANCH"
echo ""
echo "Done. Deployed main ($MAIN_HEAD) -> $REMOTE/$BRANCH"
fi
# Switch back to main
git checkout main
echo ""
echo "Done. Deployed main ($MAIN_HEAD) -> $REMOTE/$BRANCH"