mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.
This commit is contained in:
@@ -470,7 +470,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -478,7 +478,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -602,7 +602,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -610,7 +610,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -628,7 +628,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -636,7 +636,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -657,7 +657,7 @@
|
|||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -670,7 +670,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||||
@@ -696,7 +696,7 @@
|
|||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -709,7 +709,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -732,7 +732,7 @@
|
|||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -745,7 +745,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import 'utils/platform.dart';
|
|||||||
import 'utils/ui.dart';
|
import 'utils/ui.dart';
|
||||||
|
|
||||||
final _logger = Logger('UPDATE');
|
final _logger = Logger('UPDATE');
|
||||||
late final String _dlDir;
|
|
||||||
|
|
||||||
Future<bool> isFileAvailable(String url) async {
|
Future<bool> isFileAvailable(String url) async {
|
||||||
try {
|
try {
|
||||||
@@ -97,22 +96,44 @@ Future<void> _doUpdate(AppUpdate update, BuildContext context, S s) async {
|
|||||||
fileName: fileName,
|
fileName: fileName,
|
||||||
isAutoRequestInstall: false,
|
isAutoRequestInstall: false,
|
||||||
);
|
);
|
||||||
if (id == null) {
|
RUpgrade.stream.listen((event) async {
|
||||||
showSnackBar(context, const Text('install id is null'));
|
if (event.status?.value == 3) {
|
||||||
return;
|
if (id == null) {
|
||||||
}
|
showSnackBar(context, const Text('install id is null'));
|
||||||
final sha256 = update.sha256.current;
|
return;
|
||||||
if (sha256 == null) {
|
}
|
||||||
showSnackBar(context, const Text('sha256 is null'));
|
final sha256 = () {
|
||||||
return;
|
try {
|
||||||
}
|
return fileName.split('.').first;
|
||||||
final dlPath = pathJoin(_dlDir, fileName);
|
} catch (e) {
|
||||||
final computed = await getFileSha256(dlPath);
|
_logger.warning('sha256 parse failed: $e');
|
||||||
if (computed != sha256) {
|
return null;
|
||||||
showSnackBar(context, Text('Mismatch sha256: $computed, $sha256'));
|
}
|
||||||
return;
|
}();
|
||||||
}
|
final dlPath = pathJoin(await _dlDir, fileName);
|
||||||
RUpgrade.install(id);
|
final computed = await getFileSha256(dlPath);
|
||||||
|
if (computed != sha256) {
|
||||||
|
_logger.info('Mismatch sha256: $computed, $sha256');
|
||||||
|
final resume = await showRoundDialog(
|
||||||
|
context: context,
|
||||||
|
title: Text(s.attention),
|
||||||
|
child: const Text('sha256 is null'),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => context.pop(false),
|
||||||
|
child: Text(s.cancel),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => context.pop(true),
|
||||||
|
child: Text(s.ok, style: const TextStyle(color: Colors.red)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
if (!resume) return;
|
||||||
|
}
|
||||||
|
RUpgrade.install(id);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (isIOS) {
|
} else if (isIOS) {
|
||||||
await RUpgrade.upgradeFromAppStore('1586449703');
|
await RUpgrade.upgradeFromAppStore('1586449703');
|
||||||
} else {
|
} else {
|
||||||
@@ -132,9 +153,10 @@ Future<void> _doUpdate(AppUpdate update, BuildContext context, S s) async {
|
|||||||
// rmdir Download
|
// rmdir Download
|
||||||
Future<void> _rmDownloadApks() async {
|
Future<void> _rmDownloadApks() async {
|
||||||
if (!isAndroid) return;
|
if (!isAndroid) return;
|
||||||
_dlDir = pathJoin((await docDir).path, 'Download');
|
final dlDir = Directory(await _dlDir);
|
||||||
final dlDir = Directory(_dlDir);
|
|
||||||
if (await dlDir.exists()) {
|
if (await dlDir.exists()) {
|
||||||
await dlDir.delete(recursive: true);
|
await dlDir.delete(recursive: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<String> get _dlDir async => pathJoin((await docDir).path, 'Download');
|
||||||
|
|||||||
@@ -34,13 +34,11 @@ class AppUpdate {
|
|||||||
required this.changelog,
|
required this.changelog,
|
||||||
required this.build,
|
required this.build,
|
||||||
required this.url,
|
required this.url,
|
||||||
required this.sha256,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
final AppUpdatePlatformSpecific<String> changelog;
|
final AppUpdatePlatformSpecific<String> changelog;
|
||||||
final Build build;
|
final Build build;
|
||||||
final AppUpdatePlatformSpecific<String> url;
|
final AppUpdatePlatformSpecific<String> url;
|
||||||
final AppUpdatePlatformSpecific<String?> sha256;
|
|
||||||
|
|
||||||
factory AppUpdate.fromRawJson(String str) =>
|
factory AppUpdate.fromRawJson(String str) =>
|
||||||
AppUpdate.fromJson(json.decode(str));
|
AppUpdate.fromJson(json.decode(str));
|
||||||
@@ -51,14 +49,12 @@ class AppUpdate {
|
|||||||
changelog: AppUpdatePlatformSpecific.fromJson(json["changelog"]),
|
changelog: AppUpdatePlatformSpecific.fromJson(json["changelog"]),
|
||||||
build: Build.fromJson(json["build"]),
|
build: Build.fromJson(json["build"]),
|
||||||
url: AppUpdatePlatformSpecific.fromJson(json["url"]),
|
url: AppUpdatePlatformSpecific.fromJson(json["url"]),
|
||||||
sha256: AppUpdatePlatformSpecific.fromJson(json["sha256"]),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
"changelog": changelog.toJson(),
|
"changelog": changelog.toJson(),
|
||||||
"build": build.toJson(),
|
"build": build.toJson(),
|
||||||
"url": url.toJson(),
|
"url": url.toJson(),
|
||||||
"sha256": sha256.toJson(),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 452;
|
static const int build = 453;
|
||||||
static const String engine = "3.10.6";
|
static const String engine = "3.10.6";
|
||||||
static const String buildAt = "2023-08-08 16:29:00.513310";
|
static const String buildAt = "2023-08-08 17:41:45.597966";
|
||||||
static const int modifications = 11;
|
static const int modifications = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,10 +149,16 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
}
|
}
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
key: Key(si.spi.id + (_tag ?? '')),
|
key: Key(si.spi.id + (_tag ?? '')),
|
||||||
onTap: () => AppRoute(
|
onTap: () {
|
||||||
ServerDetailPage(si.spi.id),
|
if (si.state == ServerState.connected) {
|
||||||
'server detail page',
|
AppRoute(
|
||||||
).go(context),
|
ServerDetailPage(si.spi.id),
|
||||||
|
'server detail page',
|
||||||
|
).go(context);
|
||||||
|
} else {
|
||||||
|
_showFailReason(si.status);
|
||||||
|
}
|
||||||
|
},
|
||||||
child: RoundRectCard(
|
child: RoundRectCard(
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(13),
|
padding: const EdgeInsets.all(13),
|
||||||
@@ -260,19 +266,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
);
|
);
|
||||||
if (cs == ServerState.failed && ss.failedInfo != null) {
|
if (cs == ServerState.failed && ss.failedInfo != null) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => showRoundDialog(
|
onTap: () => _showFailReason(ss),
|
||||||
context: context,
|
|
||||||
title: Text(_s.error),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Text(ss.failedInfo!),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => copy2Clipboard(ss.failedInfo!),
|
|
||||||
child: Text(_s.copy),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
_s.viewErr,
|
_s.viewErr,
|
||||||
style: textSize12Grey,
|
style: textSize12Grey,
|
||||||
@@ -287,6 +281,22 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showFailReason(ServerStatus ss) {
|
||||||
|
showRoundDialog(
|
||||||
|
context: context,
|
||||||
|
title: Text(_s.error),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Text(ss.failedInfo!),
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => copy2Clipboard(ss.failedInfo!),
|
||||||
|
child: Text(_s.copy),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildSSHBtn(ServerPrivateInfo spi) {
|
Widget _buildSSHBtn(ServerPrivateInfo spi) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: const Icon(Icons.terminal, size: 21),
|
child: const Icon(Icons.terminal, size: 21),
|
||||||
|
|||||||
@@ -475,9 +475,9 @@
|
|||||||
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -490,9 +490,9 @@
|
|||||||
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
|
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -505,9 +505,9 @@
|
|||||||
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
|
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 452;
|
CURRENT_PROJECT_VERSION = 453;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.452;
|
MARKETING_VERSION = 1.0.453;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
10
make.dart
10
make.dart
@@ -91,8 +91,8 @@ Future<void> dartFormat() async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> getFileSha1(String path) async {
|
Future<String> getFileSha256(String path) async {
|
||||||
final result = await Process.run('shasum', ['-a', '1', path]);
|
final result = await Process.run('shasum', ['-a', '256', path]);
|
||||||
final stdout = result.stdout as String;
|
final stdout = result.stdout as String;
|
||||||
return stdout.split(' ')[0];
|
return stdout.split(' ')[0];
|
||||||
}
|
}
|
||||||
@@ -142,11 +142,11 @@ Future<void> flutterBuildAndroid() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> scp2CDN() async {
|
Future<void> scp2CDN() async {
|
||||||
final sha1 = await getFileSha1(apkPath);
|
final sha256 = await getFileSha256(apkPath);
|
||||||
print('SHA1: $sha1');
|
print('SHA256: $sha256');
|
||||||
final result = await Process.run(
|
final result = await Process.run(
|
||||||
'scp',
|
'scp',
|
||||||
[apkPath, 'hk:/var/www/res/serverbox/apks/$build.apk'],
|
[apkPath, 'hk:/var/www/res/serverbox/$sha256.apk'],
|
||||||
runInShell: true,
|
runInShell: true,
|
||||||
);
|
);
|
||||||
if (result.exitCode != 0) {
|
if (result.exitCode != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user