# App update deployment (Apache)

Authoritative server: **85.198.11.216**  
Document root on server: **`/var/www/html/app-update`**

## DEPLOYMENT_BASELINE_VERSION

**`1.0.0`** — initial production release for all stores (Fit Beat has not been published on any store yet).

| Source | Version |
|--------|---------|
| `ProjectSettings/ProjectSettings.asset` | `1.0.0` |
| Build Profiles (Android™, Salari, Windows) | `1.0.0` |

**Source of truth:** `Assets/MonoGames/JustDance/Settings/AppReleaseBuildConfig.asset` — per-store `applicationVersion`, release notes, force-update, and store URLs. Use the Inspector buttons **Generate All App-Update JSON Files** and **Build Selected Store** (do not hand-edit JSON for routine releases).

Legacy `app-update.json` uses **one `releases[]` row per store** so Cafe Bazaar, Myket, Google Play, and App Store can ship different version strings without breaking the existing DTO.

## Production readiness

| Artifact | Store URLs in JSON | Ready for production publish |
|----------|-------------------|------------------------------|
| `app-update.json` (legacy) | All empty | **No** — fill verified listing URLs |
| `cafebazaar/app-update.json` | Empty | **No** |
| `myket/app-update.json` | Empty | **No** |
| `google-play/app-update.json` | Empty | **No** |
| `app-store/app-update.json` | Empty | **No** — also requires App Store listing ID/URL |

Do **not** fabricate Play/Bazaar/Myket/App Store URLs. Candidate Android package from repo: **`com.TeamPlus.SweetSugar`** (not verified as live listing).

## Public endpoints

```text
http://85.198.11.216/app-update/app-update.json
http://85.198.11.216/app-update/cafebazaar/app-update.json
http://85.198.11.216/app-update/myket/app-update.json
http://85.198.11.216/app-update/google-play/app-update.json
http://85.198.11.216/app-update/app-store/app-update.json
```

## Local → server mapping

| Local path | Server path |
|------------|-------------|
| `Deployment/app-update/app-update.json` | `/var/www/html/app-update/app-update.json` |
| `Deployment/app-update/cafebazaar/app-update.json` | `/var/www/html/app-update/cafebazaar/app-update.json` |
| `Deployment/app-update/myket/app-update.json` | `/var/www/html/app-update/myket/app-update.json` |
| `Deployment/app-update/google-play/app-update.json` | `/var/www/html/app-update/google-play/app-update.json` |
| `Deployment/app-update/app-store/app-update.json` | `/var/www/html/app-update/app-store/app-update.json` |
| `Deployment/app-update/.htaccess` | `/var/www/html/app-update/.htaccess` |

Optional button images (from Unity project):

| Local | Server |
|-------|--------|
| `Assets/MonoGames/JustDance/Art/Sprites/cafebazaar.png` | `/var/www/html/app-update/cafebazaar.png` |
| `Assets/MonoGames/JustDance/Art/Sprites/myket.png` | `/var/www/html/app-update/myket.png` |

## Upload commands

From the Unity project root (`justdance`):

```powershell
scp -r Deployment/app-update/* user@85.198.11.216:/var/www/html/app-update/
```

Optional PNGs:

```powershell
scp Assets/MonoGames/JustDance/Art/Sprites/cafebazaar.png user@85.198.11.216:/var/www/html/app-update/cafebazaar.png
scp Assets/MonoGames/JustDance/Art/Sprites/myket.png user@85.198.11.216:/var/www/html/app-update/myket.png
```

Replace `user` with your SSH account. Do **not** upload `qa/` to production.

## Apache prerequisites

- `.htaccess` uses `mod_headers` for cache control on `app-update.json` only.
- Ensure `AllowOverride` permits `.htaccess` in this directory.

## Client behavior (summary)

- New builds resolve **store-specific JSON** from `ApkMarketType`; legacy **`/app-update/app-update.json`** remains fallback.
- JSON field **`sourceUpdaDatateUrls`** (spelling preserved) should list **only** the legacy root URL — not store-specific primaries.
- Empty store `url` values: update UI shows text but **does not** open invalid links.
