Skip to content

Commit d02155e

Browse files
committed
add screenshots
1 parent 0f04473 commit d02155e

15 files changed

Lines changed: 1471 additions & 284 deletions

.github/workflows/android-release.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ jobs:
8585
echo "ANDROID_APP_ID=com.volthawk.dota_keeper" >> $GITHUB_ENV
8686
fi
8787
88-
- name: Patch applicationId for beta
89-
if: env.IS_BETA == 'true'
90-
run: |
91-
sed -i \
92-
's/applicationId = "com.volthawk.dota_keeper"/applicationId = "com.volthawk.dota_keeper_beta"/' \
93-
src-tauri/gen/android/app/build.gradle.kts
94-
echo "applicationId patched to com.volthawk.dota_keeper_beta"
95-
9688
# ── AAB (for Google Play Store) ────────────────────────────────────────
9789

9890
- name: Build release AAB (all ABIs)
@@ -101,7 +93,12 @@ jobs:
10193
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
10294
PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }}
10395
PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.PUBLIC_SUPABASE_ANON_KEY }}
104-
run: yarn tauri android build --aab true
96+
run: |
97+
if [ "$IS_BETA" = "true" ]; then
98+
yarn tauri android build --aab true --config src-tauri/tauri.beta.conf.json
99+
else
100+
yarn tauri android build --aab true
101+
fi
105102
106103
- name: Sign AAB
107104
run: |

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ vite.config.js.timestamp-*
1414
vite.config.ts.timestamp-*
1515
.claude
1616
.vscode
17-
meta/social
17+
meta/social
18+
meta/screenshots/
19+
scripts/mock-data.json
20+
.env.screenshots
2.3 MB
Binary file not shown.
1.54 MB
Binary file not shown.
650 KB
Loading
599 KB
Binary file not shown.

create-playstore-screenshots.ps1

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#Requires -Version 5.1
2+
<#
3+
.SYNOPSIS
4+
Generates Play Store screenshots for all required device form factors.
5+
6+
.DESCRIPTION
7+
1. Reads SCREENSHOT_STEAM_ID from .env.screenshots
8+
2. Fetches real match data from OpenDota API
9+
3. Captures screenshots via Playwright for phone, 7" tablet, 10" tablet, Chromebook
10+
4. Outputs PNGs to meta\screenshots\<device>\
11+
12+
.EXAMPLE
13+
.\create-playstore-screenshots.ps1
14+
#>
15+
16+
Set-StrictMode -Version Latest
17+
$ErrorActionPreference = "Stop"
18+
19+
$Root = $PSScriptRoot
20+
21+
# ---------------------------------------------------------------------------
22+
# 1. Load .env.screenshots
23+
# ---------------------------------------------------------------------------
24+
25+
$EnvFile = Join-Path $Root ".env.screenshots"
26+
if (-not (Test-Path $EnvFile)) {
27+
Write-Error @"
28+
.env.screenshots not found.
29+
Copy the example and fill in your Steam64 ID:
30+
31+
Copy-Item .env.screenshots.example .env.screenshots
32+
33+
Then edit .env.screenshots and set:
34+
SCREENSHOT_STEAM_ID=76561198XXXXXXXXX
35+
"@
36+
exit 1
37+
}
38+
39+
foreach ($line in Get-Content $EnvFile) {
40+
$line = $line.Trim()
41+
if (-not $line -or $line.StartsWith("#")) { continue }
42+
$parts = $line -split "=", 2
43+
if ($parts.Count -eq 2) {
44+
$key = $parts[0].Trim()
45+
$val = $parts[1].Trim().Trim('"').Trim("'")
46+
[System.Environment]::SetEnvironmentVariable($key, $val, "Process")
47+
}
48+
}
49+
50+
if (-not $env:SCREENSHOT_STEAM_ID) {
51+
Write-Error "SCREENSHOT_STEAM_ID is not set in .env.screenshots"
52+
exit 1
53+
}
54+
55+
Write-Host ""
56+
Write-Host "=== Dota Keeper - Play Store Screenshots ===" -ForegroundColor Cyan
57+
Write-Host "Steam ID : $($env:SCREENSHOT_STEAM_ID.Substring(0, 10))..." -ForegroundColor DarkGray
58+
Write-Host ""
59+
60+
# ---------------------------------------------------------------------------
61+
# 2. Fetch mock data from OpenDota
62+
# ---------------------------------------------------------------------------
63+
64+
Write-Host "Step 1/2 Fetching match data from OpenDota..." -ForegroundColor Yellow
65+
npm run screenshots:fetch
66+
if ($LASTEXITCODE -ne 0) {
67+
Write-Error "Failed to fetch mock data. Check your Steam ID and that your OpenDota profile is public."
68+
exit 1
69+
}
70+
71+
Write-Host ""
72+
73+
# ---------------------------------------------------------------------------
74+
# 3. Capture screenshots
75+
# ---------------------------------------------------------------------------
76+
77+
Write-Host "Step 2/2 Capturing screenshots..." -ForegroundColor Yellow
78+
npm run screenshots
79+
if ($LASTEXITCODE -ne 0) {
80+
Write-Error "Screenshot capture failed."
81+
exit 1
82+
}
83+
84+
# ---------------------------------------------------------------------------
85+
# 4. Summary
86+
# ---------------------------------------------------------------------------
87+
88+
$OutDir = Join-Path $Root "meta\screenshots"
89+
$Files = @(Get-ChildItem -Path $OutDir -Recurse -Filter "*.png" -ErrorAction SilentlyContinue)
90+
91+
Write-Host ""
92+
Write-Host "Done!" -ForegroundColor Green
93+
Write-Host "$($Files.Count) screenshots saved to: $OutDir" -ForegroundColor Green
94+
Write-Host ""
95+
96+
# Open the folder in Explorer
97+
Start-Process explorer.exe $OutDir
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Test Guide: Play Store Screenshot Automation
2+
3+
## Prerequisites
4+
- Node 18+, Playwright installed (`npm install` already handles this)
5+
- Your Steam64 ID (find it at https://steamid.io/ or via your Steam profile URL)
6+
- Your OpenDota profile must be **public**
7+
8+
## Steps
9+
10+
### 1. Configure your Steam ID
11+
Copy the example env file and fill it in:
12+
```
13+
cp .env.screenshots.example .env.screenshots
14+
# Edit .env.screenshots and set SCREENSHOT_STEAM_ID=76561198XXXXXXXXX
15+
```
16+
17+
### 2. Fetch mock data from OpenDota
18+
```
19+
npm run screenshots:fetch
20+
```
21+
Expected output:
22+
- Fetches 30 matches from OpenDota public API
23+
- Prints: `Saved mock data to: scripts/mock-data.json`
24+
- Check `scripts/mock-data.json` exists and contains matches/goals
25+
26+
### 3. Capture screenshots
27+
```
28+
npm run screenshots
29+
```
30+
(The script starts the Vite dev server automatically, takes screenshots, then stops it.)
31+
32+
Or if your dev server is already running:
33+
```
34+
node scripts/screenshots.js --no-server
35+
```
36+
37+
Expected output:
38+
- Prints progress for each device × route
39+
- All 4 devices × up to 6 routes = up to 24 screenshots
40+
41+
### 4. Check output
42+
Screenshots land in `meta/screenshots/<device>/<route>.png`:
43+
```
44+
meta/screenshots/
45+
phone/
46+
dashboard.png
47+
matches.png
48+
goals.png
49+
analysis.png
50+
match-detail.png
51+
goal-detail.png
52+
tablet7/ ...
53+
tablet10/ ...
54+
chromebook/ ...
55+
```
56+
57+
## What to verify
58+
- [ ] All 4 device folders exist with PNG files
59+
- [ ] Screenshots show realistic data (matches, goals, progress charts) — not empty states
60+
- [ ] Steam ID is NOT visible in screenshots (redacted in layout mock)
61+
- [ ] Phone screenshots look good at 1080×1920
62+
- [ ] Tablet screenshots look good at 1200×1920 and 1600×2560
63+
- [ ] No error banners or loading spinners visible in screenshots
64+
65+
## One-shot (fetch + screenshot)
66+
```
67+
npm run screenshots:all
68+
```
File renamed without changes.

0 commit comments

Comments
 (0)