Private
Public Access
Deploy and upgrade only from tagged releases, not branch tip
deploy/upgrade.sh now fetches tags and checks out whichever sorts newest (detached HEAD) instead of git pull --ff-only on a branch, now that the project has a real release process (dated tags, e.g. v2026.9.3) and a public mirror. Keeps production from ever landing on an untagged commit. DEPLOYMENT.md's initial-clone steps and Upgrades section updated to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+11
-2
@@ -16,9 +16,18 @@ BACKEND_DIR="${REPO_DIR}/backend"
|
||||
FRONTEND_DIR="${REPO_DIR}/frontend"
|
||||
ENV_FILE="/etc/ds-chat/env"
|
||||
|
||||
echo "==> Pulling latest code"
|
||||
echo "==> Fetching latest release"
|
||||
cd "$REPO_DIR"
|
||||
git pull --ff-only
|
||||
git fetch --tags --force
|
||||
LATEST_TAG="$(git tag --sort=-creatordate | head -n1)"
|
||||
if [[ -z "$LATEST_TAG" ]]; then
|
||||
echo "No tags found -- nothing to deploy" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Deploying $LATEST_TAG"
|
||||
# Detached HEAD, not a branch checkout -- this directory only ever runs a
|
||||
# tagged release, never whatever the default branch's tip happens to be.
|
||||
git checkout --quiet --detach "$LATEST_TAG"
|
||||
|
||||
echo "==> Installing backend dependencies"
|
||||
cd "$BACKEND_DIR"
|
||||
|
||||
Reference in New Issue
Block a user