-
Notifications
You must be signed in to change notification settings - Fork 1
Consolidate static/compliance files to single source of truth with sync script #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env bash | ||
| # Script: sync-static.sh | ||
| # Does: Copies compliance/static files from backend/api/static (source of truth) to frontend/public. | ||
| # Run this whenever the backend static files change to keep the frontend web build in sync. | ||
| # Use: ./sync-static.sh | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" | ||
|
|
||
| SRC="$ROOT/backend/api/static" | ||
| DST="$ROOT/frontend/public" | ||
|
|
||
| FILES=( | ||
| apple-app-site-association | ||
| privacy-policy.html | ||
| account-deletion.html | ||
| ) | ||
|
|
||
| for file in "${FILES[@]}"; do | ||
| src_path="$SRC/$file" | ||
| dst_path="$DST/$file" | ||
|
|
||
| if [[ ! -f "$src_path" ]]; then | ||
| echo "WARNING: Source file not found, skipping: $src_path" | ||
| continue | ||
| fi | ||
|
|
||
| if cmp -s "$src_path" "$dst_path" 2>/dev/null; then | ||
| echo "Up to date: $file" | ||
| else | ||
| cp "$src_path" "$dst_path" | ||
| echo "Synced: $file" | ||
| fi | ||
| done | ||
|
|
||
| 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 | |
|
|
||
| For detailed instructions, see [INSTRUCTIONS.md](INSTRUCTIONS.md). | ||
|
|
||
| ## Static file sync | ||
|
|
||
| `backend/api/static/` is the source of truth for compliance and deep-linking files | ||
| (`apple-app-site-association`, `privacy-policy.html`, `account-deletion.html`). | ||
| The same files are mirrored into `frontend/public/` for the Expo web build. | ||
|
Comment on lines
+79
to
+81
|
||
|
|
||
| Run `Bash-Scripts/sync-static.sh` after editing any file in `backend/api/static/` | ||
| to keep the frontend copy in sync. | ||
|
Comment on lines
+83
to
+84
|
||
|
|
||
| ## Deployment DB scripts | ||
|
|
||
| All 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> | |
| <ol> | ||
| <li> | ||
| Email us at | ||
| <a href="mailto:mail@elifouts.com">mail@elifouts.com</a> with the | ||
| <a href="mailto:mail@elifouts.net">mail@elifouts.net</a> with the | ||
| subject "Account Deletion Request" and include the username and the | ||
|
Comment on lines
239
to
241
|
||
| email address associated with your account. | ||
| </li> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header comment says
Use: ./sync-static.sh, but the script lives underBash-Scripts/and the README calls it asBash-Scripts/sync-static.sh. Update the usage line (or mention both repo-root and in-directory invocation) to avoid incorrect copy/paste.