File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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."
Original file line number Diff line number Diff line change @@ -74,6 +74,15 @@ Scan the QR code with Expo Go on your phone. The app will automatically connect
7474
7575For 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
7988All deployment database script commands and usage are documented in:
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments