Косметические правки по фронту, раскатка приложения в продакшн версии, исправление бага с созданием контакта
This commit is contained in:
Binary file not shown.
@@ -23,6 +23,73 @@ npm test
|
||||
|
||||
Запуск приложения выполняется отдельно командой `npm run android`. Проект использует managed Expo workflow и не хранит каталоги `android/` и `ios/`.
|
||||
|
||||
## Сборка
|
||||
## Сборка (EAS)
|
||||
|
||||
Профили development, preview и production определены в `eas.json`. Перед первой EAS-сборкой потребуется привязать Expo-проект и настроить signing credentials.
|
||||
Профили заданы в `eas.json`. Env для билда берётся из профиля (`eas.json` → `env`), а не из локального `.env`.
|
||||
|
||||
| Профиль | Артефакт | API | `EXPO_PUBLIC_APP_ENV` |
|
||||
|---|---|---|---|
|
||||
| `preview` | APK (внутренняя установка) | `dev-chat.han0107.ru` | `production-like` (есть «Диагностика») |
|
||||
| `production` | AAB (Google Play) | `chat.han0107.ru` | `production` (без диагностики) |
|
||||
| `development` | Dev Client | из окружения/локально | для разработки с `expo-dev-client` |
|
||||
|
||||
### Один раз: вход в Expo
|
||||
|
||||
```powershell
|
||||
cd C:\Users\MI\Documents\Assistent\HAN_chat_specification\VM4_Expo-mobile
|
||||
npx eas-cli login
|
||||
npx eas-cli whoami
|
||||
```
|
||||
|
||||
Проект уже привязан (`owner: anzh`, `projectId` в `app.config.ts`). Android keystore хранится remote на Expo.
|
||||
|
||||
### Перед сборкой (рекомендуется)
|
||||
|
||||
```powershell
|
||||
npm run typecheck
|
||||
npm test
|
||||
```
|
||||
|
||||
### Preview — APK на телефон
|
||||
|
||||
```powershell
|
||||
npx eas-cli build --profile preview --platform android
|
||||
```
|
||||
|
||||
После успеха откройте ссылку из вывода CLI (или `https://expo.dev/accounts/anzh/projects/han-chat/builds`) и скачайте APK.
|
||||
|
||||
### Production — AAB для Play Store
|
||||
|
||||
```powershell
|
||||
npx eas-cli build --profile production --platform android
|
||||
```
|
||||
|
||||
`versionCode` поднимается автоматически (`appVersionSource: remote` + `autoIncrement`).
|
||||
|
||||
### Полезные команды
|
||||
|
||||
```powershell
|
||||
# только отправить билд и сразу вернуть ссылку (не ждать окончания)
|
||||
npx eas-cli build --profile production --platform android --no-wait
|
||||
|
||||
# статус конкретной сборки
|
||||
npx eas-cli build:view <BUILD_ID>
|
||||
|
||||
# список последних сборок
|
||||
npx eas-cli build:list --platform android --limit 5
|
||||
|
||||
# скачать артефакт готовой сборки
|
||||
npx eas-cli build:download --id <BUILD_ID>
|
||||
|
||||
# синхронизировать versionCode с Play Console (если нужно вручную)
|
||||
npx eas-cli build:version:set
|
||||
```
|
||||
|
||||
### Keycloak redirect URI
|
||||
|
||||
Для боевого хоста в клиенте `han-chat-frontend` должны быть exact URI:
|
||||
|
||||
- `https://chat.han0107.ru/mobile/oidc/callback`
|
||||
- `han-chat://auth/callback`
|
||||
|
||||
Для preview — те же пути на `https://dev-chat.han0107.ru`.
|
||||
|
||||
@@ -65,7 +65,7 @@ export default function ProfileScreen() {
|
||||
<Feather name="user" size={40} color={colors.primaryForeground} />
|
||||
</View>
|
||||
<Text style={stylesLocal.name}>{fullName}</Text>
|
||||
<Text style={styles.muted}>{personal?.citizenship ? `Гражданство: ${personal.citizenship}` : "Мигрант"}</Text>
|
||||
<Text style={styles.muted}>{personal?.citizenship ? `Гражданство: ${personal.citizenship}` : "Гражданство не указано"}</Text>
|
||||
</View>
|
||||
|
||||
{(profile.isLoading || documents.isLoading) && <View style={{ padding: spacing.lg }}><Loading /></View>}
|
||||
|
||||
@@ -22,6 +22,16 @@
|
||||
"EXPO_PUBLIC_APP_ENV": "production-like"
|
||||
}
|
||||
},
|
||||
"production": {}
|
||||
"production": {
|
||||
"distribution": "store",
|
||||
"autoIncrement": true,
|
||||
"env": {
|
||||
"EXPO_PUBLIC_API_BASE_URL": "https://chat.han0107.ru",
|
||||
"EXPO_PUBLIC_AUTH_BASE_URL": "https://chat.han0107.ru/auth",
|
||||
"EXPO_PUBLIC_KEYCLOAK_REALM": "han-chat",
|
||||
"EXPO_PUBLIC_KEYCLOAK_CLIENT_ID": "han-chat-frontend",
|
||||
"EXPO_PUBLIC_APP_ENV": "production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user