Skip to content

Commit f593ab1

Browse files
Copilotgrillinr
andauthored
Consolidate static/compliance files to single source of truth with sync script (#144)
* Initial plan * Add sync-static.sh to prevent static file drift; fix account-deletion.html email Co-authored-by: grillinr <169214325+grillinr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: grillinr <169214325+grillinr@users.noreply.github.com>
1 parent bcc2eb0 commit f593ab1

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

Bash-Scripts/sync-static.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
# Script: sync-static.sh
3+
# Does: Copies compliance/static files from backend/api/static (source of truth) to frontend/public.
4+
# Run this whenever the backend static files change to keep the frontend web build in sync.
5+
# Use: ./sync-static.sh
6+
7+
set -euo pipefail
8+
9+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10+
ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
11+
12+
SRC="$ROOT/backend/api/static"
13+
DST="$ROOT/frontend/public"
14+
15+
FILES=(
16+
apple-app-site-association
17+
privacy-policy.html
18+
account-deletion.html
19+
)
20+
21+
for file in "${FILES[@]}"; do
22+
src_path="$SRC/$file"
23+
dst_path="$DST/$file"
24+
25+
if [[ ! -f "$src_path" ]]; then
26+
echo "WARNING: Source file not found, skipping: $src_path"
27+
continue
28+
fi
29+
30+
if cmp -s "$src_path" "$dst_path" 2>/dev/null; then
31+
echo "Up to date: $file"
32+
else
33+
cp "$src_path" "$dst_path"
34+
echo "Synced: $file"
35+
fi
36+
done
37+
38+
echo "Sync complete."

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ Scan the QR code with Expo Go on your phone. The app will automatically connect
7474

7575
For detailed instructions, see [INSTRUCTIONS.md](INSTRUCTIONS.md).
7676

77+
## Static file sync
78+
79+
`backend/api/static/` is the source of truth for compliance and deep-linking files
80+
(`apple-app-site-association`, `privacy-policy.html`, `account-deletion.html`).
81+
The same files are mirrored into `frontend/public/` for the Expo web build.
82+
83+
Run `Bash-Scripts/sync-static.sh` after editing any file in `backend/api/static/`
84+
to keep the frontend copy in sync.
85+
7786
## Deployment DB scripts
7887

7988
All deployment database script commands and usage are documented in:

frontend/public/account-deletion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ <h2>How to request deletion</h2>
237237
<ol>
238238
<li>
239239
Email us at
240-
<a href="mailto:mail@elifouts.com">mail@elifouts.com</a> with the
240+
<a href="mailto:mail@elifouts.net">mail@elifouts.net</a> with the
241241
subject "Account Deletion Request" and include the username and the
242242
email address associated with your account.
243243
</li>

0 commit comments

Comments
 (0)