- CI: ci/changed-services.sh compares HEAD with the last deployment's v* tag: the Rust tests run only when a Rust service changed, only the changed images are built, and the server's .env gets a tag per built service (TAG_FRONTEND, TAG_BACKEND, ...; TAG stays the fallback), so only their containers restart. Everything when in doubt. - The frontend image knows its version (APP_VERSION, the commit): Next's deploymentId (a page from an older version reloads on navigation) and /api/version. VersionWatcher checks every 5 minutes and when the tab comes to the front: idle with nothing typed, the page reloads; otherwise a "Frissült az oldal" notice offers it. - Home page: "Nem sablonszöveg, hanem a te elemzésed" in the hero, the "Miért más?" section now about analyses written for each chart; the two hero buttons side by side on phones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
24 lines
1.2 KiB
Bash
Executable File
24 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# Prints the services whose image has to be built for HEAD: those whose files
|
|
# changed since the last deployment (the newest v* release tag among HEAD's
|
|
# ancestors; the release step tags every deployment). Prints all of them when
|
|
# there is no such tag or the comparison fails, so a doubt builds everything.
|
|
# Needs the full history and the tags (git fetch --unshallow --tags).
|
|
#
|
|
# frontend services/frontend/
|
|
# backend, worker, forum their folder, the shared crates/, Cargo.toml, Cargo.lock
|
|
# horoscope-api the same, and scripts/fetch-deps.sh
|
|
set -u
|
|
ALL="horoscope-api backend worker forum frontend"
|
|
prev=$(git describe --tags --abbrev=0 --match 'v*' HEAD 2>/dev/null) || { echo "$ALL"; exit 0; }
|
|
files=$(git diff --name-only "$prev" HEAD) || { echo "$ALL"; exit 0; }
|
|
changed() { printf '%s\n' "$files" | grep -Eq "$1"; }
|
|
rust='^(crates/|Cargo\.toml$|Cargo\.lock$)'
|
|
out=""
|
|
changed "^services/horoscope-api/|^scripts/fetch-deps\.sh$|$rust" && out="$out horoscope-api"
|
|
for svc in backend worker forum; do
|
|
changed "^services/$svc/|$rust" && out="$out $svc"
|
|
done
|
|
changed '^services/frontend/' && out="$out frontend"
|
|
echo $out
|