Add cached Web-only releases through existing Docker runtime
PROMPT Docker CI and deployment / verify-and-deploy (push) Successful in 5m36s
PROMPT Docker CI and deployment / verify-and-deploy (push) Successful in 5m36s
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
# Compare to what is running, not HEAD^: include failed or skipped releases.
|
||||
ROOT=${PROMPT_ROOT:-/opt/prompt}
|
||||
BASE=${1:-}
|
||||
if [ -z "$BASE" ] && [ -f "$ROOT/current/release.env" ]; then
|
||||
BASE=$(sed -n 's/^RELEASE_SHA=//p' "$ROOT/current/release.env")
|
||||
fi
|
||||
if ! [[ "$BASE" =~ ^[0-9a-f]{40}$ ]] || ! git cat-file -e "$BASE^{commit}" 2>/dev/null; then echo full; exit; fi
|
||||
if ! git merge-base --is-ancestor "$BASE" HEAD; then echo full; exit; fi
|
||||
CHANGED=0
|
||||
while IFS= read -r -d '' file; do
|
||||
CHANGED=1
|
||||
case "$file" in
|
||||
src/pages/api/*) echo full; exit;;
|
||||
src/pages/*|src/components/*|src/styles/*|src/content/skills/*|public/*) ;;
|
||||
*) echo full; exit;;
|
||||
esac
|
||||
done < <(git diff --no-renames --name-only -z "$BASE" HEAD)
|
||||
if [ "$CHANGED" -eq 0 ]; then echo full; else echo web; fi
|
||||
Reference in New Issue
Block a user