forked from eatvio/eatvio_app
Merge pull request 'feat(menu): Added build date' (#640) from misha/eatvio_app:main into main
Reviewed-on: eatvio/eatvio_app#640
This commit is contained in:
@@ -144,7 +144,11 @@ jobs:
|
|||||||
run: flutter test
|
run: flutter test
|
||||||
|
|
||||||
- name: Build apk
|
- name: Build apk
|
||||||
run: flutter build apk --release --dart-define=HIDE_PLANS=false
|
run: |
|
||||||
|
BUILD_DATE=$(TZ=Europe/Moscow date +'%Y-%m-%d %H:%M:%S')
|
||||||
|
flutter build apk --release \
|
||||||
|
--dart-define=HIDE_PLANS=false \
|
||||||
|
--dart-define=BUILD_DATE="$BUILD_DATE"
|
||||||
|
|
||||||
- name: Rename and move apk
|
- name: Rename and move apk
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -46,13 +46,15 @@ platform :ios do
|
|||||||
|
|
||||||
match(type: "appstore", readonly: true)
|
match(type: "appstore", readonly: true)
|
||||||
increment_build_number(xcodeproj: "Runner.xcodeproj")
|
increment_build_number(xcodeproj: "Runner.xcodeproj")
|
||||||
|
|
||||||
|
build_date = Time.now.getlocal("+03:00").strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
build_app(
|
build_app(
|
||||||
workspace: "Runner.xcworkspace",
|
workspace: "Runner.xcworkspace",
|
||||||
scheme: "Runner",
|
scheme: "Runner",
|
||||||
export_method: "app-store",
|
export_method: "app-store",
|
||||||
codesigning_identity: "Apple Distribution",
|
codesigning_identity: "Apple Distribution",
|
||||||
xcargs: "--dart-define=HIDE_PLANS=true"
|
xcargs: "--dart-define=HIDE_PLANS=true --dart-define=BUILD_DATE='#{build_date}'"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:eatvio_app/core/env_config.dart';
|
|||||||
|
|
||||||
String baseUrl = EnvConfig.baseUrl;
|
String baseUrl = EnvConfig.baseUrl;
|
||||||
bool hidePlans = const bool.fromEnvironment('HIDE_PLANS', defaultValue: false);
|
bool hidePlans = const bool.fromEnvironment('HIDE_PLANS', defaultValue: false);
|
||||||
|
const buildDate = String.fromEnvironment('BUILD_DATE', defaultValue: '');
|
||||||
|
|
||||||
const List<int> durationValues = [7, 14, 21];
|
const List<int> durationValues = [7, 14, 21];
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,13 @@ class _AppInfoState extends State<AppInfo> {
|
|||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsGeometry.only(left: 16),
|
padding: const EdgeInsetsGeometry.only(left: 16),
|
||||||
child: Text('Версия приложения: $version ($buildNumber)', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)),
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('Версия приложения: $version ($buildNumber)', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)),
|
||||||
|
if (buildDate != '') Text('Дата сборки: $buildDate', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,15 +71,24 @@ class SupportScreen extends StatelessWidget {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
if (!hidePlans) ...[
|
if (!hidePlans) ...[
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/privacy.pdf')),
|
onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/public_offer.pdf')),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||||
child: Text('Политика конфиденциальности', style: TextStyle(fontSize: 16)),
|
child: Text('Публичная офёрта', style: TextStyle(fontSize: 16)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
|
InkWell(
|
||||||
|
onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/privacy.pdf')),
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
child: const Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||||
|
child: Text('Политика конфиденциальности', style: TextStyle(fontSize: 16)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/company-details')),
|
onTap: () async => await launchUrl(Uri.parse('$baseUrl/company-details')),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
|||||||
Reference in New Issue
Block a user