Add deployment scripts for blog, links, notes, photos, and projects; implement history squashing and vision processing
- Created `publish-blog.sh`, `publish-links.sh`, `publish-notes.sh`, `publish-photos.sh`, and `publish-projects.sh` for deploying respective content to the VPS. - Implemented `squash-history.sh` to replace the entire git history with a single commit. - Added `vision.ts` and `vision.spec.ts` for processing images with AI, including metadata extraction and merging. - Enhanced error handling and logging in vision processing scripts.
This commit is contained in:
parent
a123886ee4
commit
0f43bb18cc
24 changed files with 2430 additions and 41 deletions
23
scripts/squash-history.sh
Executable file
23
scripts/squash-history.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
# squash-history.sh — Replaces entire git history with a single "init" commit.
|
||||
# WARNING: Destructive and irreversible. Force-pushes to remote.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
COMMIT_MSG="${1:-init}"
|
||||
REMOTE="${2:-origin}"
|
||||
BRANCH="main"
|
||||
TEMP="temp-squash-$$"
|
||||
|
||||
echo "⚠️ This will destroy all git history and force-push to $REMOTE/$BRANCH."
|
||||
read -r -p "Continue? [y/N] " confirm
|
||||
[[ "$confirm" =~ ^[Yy]$ ]] || { echo "Aborted."; exit 0; }
|
||||
|
||||
git checkout --orphan "$TEMP"
|
||||
git add -A
|
||||
git commit -m "$COMMIT_MSG"
|
||||
git branch -D "$BRANCH"
|
||||
git branch -m "$TEMP" "$BRANCH"
|
||||
git push --force "$REMOTE" "$BRANCH"
|
||||
|
||||
echo "Done. $(git log --oneline)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue