Merge branch 'release_sky' into 'canary_release_sky'

Release sky

See merge request StarlockTeam/app-starlock!145
This commit is contained in:
李仪 2025-06-05 05:43:56 +00:00
commit bb13b9fb87
16 changed files with 107 additions and 144 deletions

View File

@ -60,6 +60,8 @@ variables:
.setup_fastlane_android:
extends: .build_rule
before_script:
- export PUB_HOSTED_URL=https://pub.flutter-io.cn
- export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
- ls -li
- export NEXT_VERSION="$(cat app_new.version)"
# - flutter pub get
@ -74,6 +76,8 @@ variables:
.setup_fastlane_ios:
extends: .build_rule
before_script:
- export PUB_HOSTED_URL=https://pub.flutter-io.cn
- export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
- ls -li
- export NEXT_VERSION="$(cat app_new.version)"
# - flutter pub get
@ -98,7 +102,6 @@ generate_git_tag:
stage: generate_tag_or_version
extends: .generate_tag_rule
before_script:
- bash pre_build.sh xhj
- bash pre_build.sh sky
- project_url=$(echo $CI_PROJECT_URL | sed 's/http:\/\///')
- echo "project_url:$project_url"
@ -155,16 +158,10 @@ create-release:
- export StarLock_VERSION=${CI_COMMIT_TAG#*-}
- echo "Uploading StarLock-${StarLock_VERSION} packages to
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/StarLock-${StarLock_VERSION}-*"
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-apk/starlock-xhj-release-${CI_COMMIT_TAG}.apk
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/starlock-xhj-release-${CI_COMMIT_TAG}.apk"'
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-apk/starlock-xhj_bundle-release-${CI_COMMIT_TAG}.aab
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/starlock-xhj_bundle-release-${CI_COMMIT_TAG}.aab"'
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-apk/starlock-sky-release-${CI_COMMIT_TAG}.apk
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/starlock-sky-release-${CI_COMMIT_TAG}.apk"'
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-apk/starlock-sky-release-${CI_COMMIT_TAG}.aab
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/starlock-sky-release-${CI_COMMIT_TAG}.aab"'
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-ipa/starlock-xhj-release-${CI_COMMIT_TAG}.ipa
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/starlock-xhj-release-${CI_COMMIT_TAG}.ipa"'
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-ipa/starlock-sky-release-${CI_COMMIT_TAG}.ipa
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${StarLock_VERSION}/starlock-sky-release-${CI_COMMIT_TAG}.ipa"'
release:
@ -174,21 +171,12 @@ create-release:
ref: '$CI_COMMIT_TAG'
assets:
links:
- name: 'xhj apk binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-xhj-release-${CI_COMMIT_TAG}.apk'
link_type: 'package'
- name: 'xhj bundle binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-xhj_bundle-release-${CI_COMMIT_TAG}.aab'
link_type: 'package'
- name: 'sky apk binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-sky-release-${CI_COMMIT_TAG}.apk'
link_type: 'package'
- name: 'sky bundle binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-sky-release-${CI_COMMIT_TAG}.aab'
link_type: 'package'
- name: 'xhj ipa binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-xhj-release-${CI_COMMIT_TAG}.ipa'
link_type: 'package'
- name: 'sky ipa binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-sky-release-${CI_COMMIT_TAG}.ipa'
link_type: 'package'

View File

@ -13,21 +13,16 @@ regex='^v[0-9]+\.[0-9]+\.[0-9]+_sky$'
if [[ "${ENV_BUILD_BRANCH}" == "canary_release_sky" ]]; then
echo "===build canary_release: ${NEXT_VERSION}"
export ENV_BUILD_TAG=${NEXT_VERSION}
bundle exec fastlane release_apk flavor:xhj --verbose
bundle exec fastlane release_apk flavor:sky --verbose
elif [[ $ENV_BUILD_TAG =~ $regex ]]; then
echo "===build release===$ENV_BUILD_TAG"
bundle exec fastlane release_apk flavor:xhj --verbose
bundle exec fastlane release_apk flavor:sky --verbose
bundle exec fastlane release_bundle flavor:xhj_bundle --verbose
bundle exec fastlane release_bundle flavor:sky --verbose
elif [[ "${ENV_BUILD_BRANCH}" == "develop_sky" ]]; then
echo "===build dev===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:dev --verbose
bundle exec fastlane beta flavor:sky env:dev --verbose
elif [[ "${ENV_BUILD_BRANCH}" == "release_sky" || "${ENV_BUILD_BRANCH}" == "feat_devops_sky" ]] ; then
echo "===build pre===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:pre --verbose
bundle exec fastlane beta flavor:sky env:pre --verbose
fi
exit 0

View File

@ -44,10 +44,6 @@ platform :android do
print_header '🏁 Before All'
print_log $current_branch
print_log $current_tag
print_log $path_file_preview_apk_default
print_log $path_file_release_apk_default
print_log $path_file_preview_apk_copy
print_log $path_file_release_apk_copy
Dir.chdir "../.." do
sh('pwd')
end
@ -55,11 +51,9 @@ platform :android do
desc "Submit a new Beta Build to Pgy Beta"
lane :beta do |options|
flavor = options[:flavor]
env = options[:env]
UI.user_error!("flavor is required") unless flavor
UI.user_error!("env is required") unless env
print_log "build #{flavor} on #{env}"
print_log "build sky on #{env}"
build_number = Time.now.strftime("%Y%m%d%H")
print_log "BuildNo #{build_number}"
build_version = $next_version
@ -70,10 +64,10 @@ platform :android do
remove_zone_pre_build(zone:"com")
Dir.chdir "../.." do
sh("flutter","pub","get")
sh("flutter", "build", "apk", "--no-tree-shake-icons", "--release", "--flavor", "#{flavor}_#{env}", "-t", "lib/main_#{flavor}_#{env}.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
sh("flutter", "build", "apk", "--no-tree-shake-icons", "--release", "--flavor", "sky_#{env}", "-t", "lib/main_sky_#{env}.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
end
old_file_path = File.join($path_apk_output_dir, "app-#{flavor}_#{env}-release.apk")
new_file_path = File.join($path_apk_output_dir, "starlock-#{flavor}-preview-#{build_version}.apk")
old_file_path = File.join($path_apk_output_dir, "app-sky_#{env}-release.apk")
new_file_path = File.join($path_apk_output_dir, "starlock-sky-preview-#{build_version}.apk")
File.rename(old_file_path, new_file_path)
logs = changelog_from_git_commits(
pretty: '- %s (%cn)',
@ -85,9 +79,7 @@ platform :android do
desc "Build & upload a new version to Gitlab Release"
lane :release_apk do |options|
flavor = options[:flavor]
UI.user_error!("flavor is required") unless flavor
print_log "build flavor for: #{flavor}"
print_log "build sky"
build_number = Time.now.strftime("%Y%m%d%H")
print_log "BuildNo #{build_number}"
build_version = $current_tag.match(/^v(\d+\.\d+\.\d+)/).captures[0]
@ -98,18 +90,16 @@ platform :android do
remove_zone_pre_build(zone:"com")
Dir.chdir "../.." do
sh("flutter","pub","get")
sh("flutter", "build", "apk", "--no-tree-shake-icons", "--release", "--flavor", "#{flavor}", "-t", "lib/main_#{flavor}_lite.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
sh("flutter", "build", "apk", "--no-tree-shake-icons", "--release", "--flavor", "sky", "-t", "lib/main_sky_lite.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
end
old_apk_file_path = File.join($path_apk_output_dir, "app-#{flavor}-release.apk")
new_apk_file_path = File.join($path_apk_output_dir, "starlock-#{flavor}-release-"+$current_tag+".apk")
old_apk_file_path = File.join($path_apk_output_dir, "app-sky-release.apk")
new_apk_file_path = File.join($path_apk_output_dir, "starlock-sky-release-"+$current_tag+".apk")
File.rename(old_apk_file_path, new_apk_file_path)
end
desc "Build & upload a new version to Gitlab Release"
lane :release_bundle do |options|
flavor = options[:flavor]
UI.user_error!("flavor is required") unless flavor
print_log "build flavor for: #{flavor}"
print_log "build sky"
build_number = Time.now.strftime("%Y%m%d%H")
print_log "BuildNo #{build_number}"
build_version = $current_tag.match(/^v(\d+\.\d+\.\d+)/).captures[0]
@ -120,10 +110,10 @@ platform :android do
remove_zone_pre_build(zone:"cn")
Dir.chdir "../.." do
sh("flutter","pub","get")
sh("flutter", "build", "appbundle", "--no-tree-shake-icons", "--release", "--flavor", "#{flavor}", "-t", "lib/main_#{flavor}_lite.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
sh("flutter", "build", "appbundle", "--no-tree-shake-icons", "--release", "--flavor", "sky", "-t", "lib/main_sky_lite.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
end
old_bundle_file_path = File.join($path_bundle_output_dir , "/#{flavor}Release/app-#{flavor}-release.aab")
new_bundle_file_path = File.join($path_bundle_output_dir , "/#{flavor}Release/starlock-#{flavor}-release-"+$current_tag+".aab")
old_bundle_file_path = File.join($path_bundle_output_dir , "/skyRelease/app-sky-release.aab")
new_bundle_file_path = File.join($path_bundle_output_dir , "/skyRelease/starlock-sky-release-"+$current_tag+".aab")
File.rename(old_bundle_file_path, new_bundle_file_path)
sh('cp',new_bundle_file_path,$path_apk_output_dir)
end

View File

@ -14,19 +14,15 @@ regex='^v[0-9]+\.[0-9]+\.[0-9]+_sky$'
if [[ "${ENV_BUILD_BRANCH}" == "canary_release_sky" ]]; then
echo "===build canary_release: ${NEXT_VERSION}"
export ENV_BUILD_TAG=${NEXT_VERSION}
bundle exec fastlane release_ipa flavor:xhj --verbose
bundle exec fastlane release_ipa flavor:sky --verbose
elif [[ $ENV_BUILD_TAG =~ $regex ]]; then
echo "===build release===$ENV_BUILD_TAG"
bundle exec fastlane release_ipa flavor:xhj --verbose
bundle exec fastlane release_ipa flavor:sky --verbose
elif [[ "${ENV_BUILD_BRANCH}" == "develop_sky" ]]; then
echo "===build dev===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:Dev --verbose
bundle exec fastlane beta flavor:sky env:Dev --verbose
elif [[ "${ENV_BUILD_BRANCH}" == "release_sky" || "${ENV_BUILD_BRANCH}" == "feat_devops_sky" ]] ; then
echo "===build pre===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:Pre --verbose
bundle exec fastlane beta flavor:sky env:Pre --verbose
fi
exit 0

View File

@ -17,22 +17,13 @@ default_platform(:ios)
# setup_travis
# --- xhj Const ---
$signing_identity_xhj_distribution = 'iPhone Distribution: Shenzhen Xinhongjia Electronics Co., Ltd. (P8997RW3V8)'
$app_identifier = 'xhj'
$provisioning_name_adhoc = 'StarApt Project Mobile Ad Hoc'
$provisioning_name_distribution = 'StarApt Project Mobile Distribution'
$gym_config_sky_preview = 'Preview-xhj'
$gym_config_sky_release = 'Release'
# --- sky Const ---
$signing_identity_sky_distribution = 'iPhone Distribution: Shenzhen Xinhongjia Electronics Co., Ltd. (P8997RW3V8)'
$signing_identity_distribution = 'iPhone Distribution: Shenzhen Xinhongjia Electronics Co., Ltd. (P8997RW3V8)'
$app_identifier = 'sky'
$provisioning_name_adhoc = 'StarApt Project Mobile Ad Hoc'
$provisioning_name_distribution = 'StarApt Project Mobile Distribution'
$gym_config_sky_preview = 'Preview-sky'
$gym_config_sky_release = 'Release'
$gym_config_preview = 'Preview-sky'
$gym_config_release = 'Release'
# --- common Const ---
$match_type_adhoc = 'adhoc'
@ -72,14 +63,12 @@ platform :ios do
desc "Build & Deliver to Pgy"
lane :beta do |options|
flavor = options[:flavor]
env = options[:env]
UI.user_error!("flavor is required") unless flavor
UI.user_error!("env is required") unless env
print_log "build #{flavor} on #{env}"
print_log "build sky on #{env}"
build_number = Time.now.strftime("%Y%m%d%H%M")
print_log "Build Commits #{build_number}"
build_version = $next_version # Time.now.strftime("%Y%m%d%H%M%S")
build_version = $next_version
print_log "build_version #{build_version}"
commit_hash = last_git_commit
short_hash = commit_hash[:abbreviated_commit_hash]
@ -89,18 +78,16 @@ platform :ios do
sh("flutter","pub","get")
end
Dir.chdir ".." do
#sh("bundle", "exec" ,"pod", "install")
sh("pod", "install")
end
Dir.chdir "../.." do
sh("flutter", "build", "ios", "--no-tree-shake-icons", "--no-codesign", "--release", "--flavor", "#{flavor}", "-t", "lib/main_#{flavor}_#{env}.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
sh("flutter", "build", "ios", "--no-tree-shake-icons", "--no-codesign", "--release", "--flavor", "sky", "-t", "lib/main_sky_#{env}.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
end
#set_bundle_short_version('./Runner/Info.plist', $current_branch)
gym_scheme_preview="#{flavor}"
gym_scheme_preview="sky"
print_log "gym_scheme_preview #{gym_scheme_preview}"
gym_configuration = "#{env}-release-#{flavor}"
gym_configuration = "#{env}-release-sky"
print_log "gym_configuration #{gym_configuration}"
ipa_default_filename = "starlock-#{flavor}-preview-#{build_version}.ipa"
ipa_default_filename = "starlock-sky-preview-#{build_version}.ipa"
print_log "ipa_default_filename #{ipa_default_filename}"
gym(
scheme: gym_scheme_preview,
@ -111,10 +98,8 @@ platform :ios do
export_method: "ad-hoc",
export_options: {
provisioningProfiles: {
"com.xhjcn.lock.dev" => "Adhoc_com.xhjcn.lock.dev.mobileprovision",
"com.xhjcn.lock.pre" => "Adhoc_com.xhjcn.lock.pre.mobileprovision",
"com.skychip.lock.dev" => "Adhoc_com.skychip.lock.dev.mobileprovision",
"com.skychip.lock.pre" => "Adhoc_com.skychip.lock.pre.mobileprovision",
"com.skychip.lock.pre" => "Adhoc_com.skychip.lock.pre.mobileprovision"
}
}
)
@ -128,9 +113,7 @@ platform :ios do
desc "Build & Deliver to App Store Connect"
lane :release_ipa do |options|
flavor = options[:flavor]
UI.user_error!("flavor is required") unless flavor
print_log "build flavor: #{flavor}"
print_log "build sky"
build_number = Time.now.strftime("%Y%m%d%H%M")
print_log "Build Commits #{build_number}"
build_version = $current_tag.match(/^v(\d+\.\d+\.\d+)/).captures[0]
@ -143,17 +126,16 @@ platform :ios do
sh("flutter","pub","get")
end
Dir.chdir ".." do
#sh("bundle", "exec" ,"pod", "install")
sh("pod", "install")
end
Dir.chdir "../.." do
sh("flutter", "build", "ios", "--no-tree-shake-icons", "--no-codesign", "--release", "--flavor", "#{flavor}", "-t", "lib/main_#{flavor}_lite.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
sh("flutter", "build", "ios", "--no-tree-shake-icons", "--no-codesign", "--release", "--flavor", "sky", "-t", "lib/main_sky_lite.dart", "--build-number=#{build_number}", "--build-name=#{build_version}")
end
gym_scheme_release="#{flavor}"
gym_scheme_release="sky"
print_log "gym_scheme_release #{gym_scheme_release}"
gym_configuration = "Release-#{flavor}"
gym_configuration = "Release-sky"
print_log "gym_configuration #{gym_configuration}"
ipa_default_filename = "starlock-#{flavor}-release-"+$current_tag+".ipa"
ipa_default_filename = "starlock-sky-release-"+$current_tag+".ipa"
print_log "ipa_default_filename #{ipa_default_filename}"
gym(
scheme: gym_scheme_release,
@ -164,12 +146,11 @@ platform :ios do
export_method: "app-store",
export_options: {
provisioningProfiles: {
"com.xhjcn.lock" => "Appstore_com.xhjcn.lock.mobileprovision",
"com.skychip.lock" => "Appstore_com.skychip.lock.mobileprovision",
"com.skychip.lock" => "Appstore_com.skychip.lock.mobileprovision"
}
}
)
auth_key_prefix=flavor.upcase
auth_key_prefix="SKY"
print_log "auth_key_prefix #{auth_key_prefix}"
api_key = app_store_connect_api_key(
key_id: ENV["#{auth_key_prefix}_APPLE_AUTH_KEY_ID"],

View File

@ -188,23 +188,23 @@ class StarLockLoginLogic extends BaseGetXController {
late StreamSubscription _agreePrivacySubscription;
void _initEventListen() {
_agreePrivacySubscription = eventBus
.on<AgreePrivacyAgreement>()
.listen((AgreePrivacyAgreement event) async {
/// ip如果属于国内才进行初始化
final CheckIPEntity entity = await ApiRepository.to.checkIpAction(ip: '');
String currentLanguage =
CurrentLocaleTool.getCurrentLocaleString(); //
// ip是国内的且选的是中文才初始化一键登录
if (entity.data!.abbreviation?.toLowerCase() == 'cn' &&
currentLanguage == 'zh_CN') {
//
await JverifyOneClickLoginManage();
state.isCheckVerifyEnable.value =
await JverifyOneClickLoginManage().checkVerifyEnable();
AppLog.log('一键登录初始化认证结果:${state.isCheckVerifyEnable.value}');
}
});
// _agreePrivacySubscription = eventBus
// .on<AgreePrivacyAgreement>()
// .listen((AgreePrivacyAgreement event) async {
// /// ip如果属于国内才进行初始化
// final CheckIPEntity entity = await ApiRepository.to.checkIpAction(ip: '');
// String currentLanguage =
// CurrentLocaleTool.getCurrentLocaleString(); //
// // ip是国内的且选的是中文才初始化一键登录
// if (entity.data!.abbreviation?.toLowerCase() == 'cn' &&
// currentLanguage == 'zh_CN') {
// //
// await JverifyOneClickLoginManage();
// state.isCheckVerifyEnable.value =
// await JverifyOneClickLoginManage().checkVerifyEnable();
// AppLog.log('一键登录初始化认证结果:${state.isCheckVerifyEnable.value}');
// }
// });
}
@override

View File

@ -106,20 +106,20 @@ Future<void> privacySDKInitialization() async {
await jpushProvider.initJPushService();
NotificationService().init(); //
/// ip如果属于国内才进行初始化
final CheckIPEntity entity = await ApiRepository.to.checkIpAction(ip: '');
if (entity.errorCode!.codeIsSuccessful) {
String currentLanguage =
CurrentLocaleTool.getCurrentLocaleString(); //
// ip是国内的且选的是中文才初始化一键登录
if (entity.data!.abbreviation?.toLowerCase() == 'cn' &&
currentLanguage == 'zh_CN') {
//
final StarLockLoginLogic loginLogic = Get.put(StarLockLoginLogic());
await JverifyOneClickLoginManage();
loginLogic.state.isCheckVerifyEnable.value =
await JverifyOneClickLoginManage().checkVerifyEnable();
eventBus.fire(AgreePrivacyAgreement());
}
}
// /// ip如果属于国内才进行初始化
// final CheckIPEntity entity = await ApiRepository.to.checkIpAction(ip: '');
// if (entity.errorCode!.codeIsSuccessful) {
// String currentLanguage =
// CurrentLocaleTool.getCurrentLocaleString(); //
// // ip是国内的且选的是中文才初始化一键登录
// if (entity.data!.abbreviation?.toLowerCase() == 'cn' &&
// currentLanguage == 'zh_CN') {
// //
// final StarLockLoginLogic loginLogic = Get.put(StarLockLoginLogic());
// await JverifyOneClickLoginManage();
// loginLogic.state.isCheckVerifyEnable.value =
// await JverifyOneClickLoginManage().checkVerifyEnable();
// eventBus.fire(AgreePrivacyAgreement());
// }
// }
}

View File

@ -220,8 +220,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () async {
final bool isNetWork =
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
final bool isNetWork = await logic.isConnected();
if (!isNetWork) {
return;
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -49,9 +48,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
// showCupertinoAlertDialog(context);
ShowTipView().showTFViewAlertDialog(
state.changeNameController,
'修改姓名'.tr,
'修改姓名'.tr, () {
state.changeNameController, '修改姓名'.tr, '修改姓名'.tr, () {
if (state.changeNameController.text.isEmpty) {
logic.showToast('请输入姓名'.tr);
return;
@ -178,7 +175,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
Visibility(
visible: !F.isSKY,
child: Obx(
() => CommonItem(
() => CommonItem(
leftTitel: '是否为管理员'.tr,
rightTitle: '',
isTipsImg: false,
@ -215,12 +212,10 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () async {
final bool isNetWork =
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
final bool isNetWork = await logic.isConnected();
if (!isNetWork) {
return;
}
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr,
() async {
state.isDeletFace.value = true;

View File

@ -222,8 +222,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () async {
final bool isNetWork =
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
final bool isNetWork = await logic.isConnected();
if (!isNetWork) {
return;
}

View File

@ -180,8 +180,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () async {
final bool isNetWork =
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
final bool isNetWork = await logic.isConnected();
if (!isNetWork) {
return;
}

View File

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:io';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
@ -175,6 +176,13 @@ class BaseGetXController extends GetxController {
});
}
///
Future<bool> isConnected() async {
final List<ConnectivityResult> connectResults =
await Connectivity().checkConnectivity();
return !connectResults.contains(ConnectivityResult.none);
}
String getUseKeyTypeStr(int? startDate, int? endDate, int? keyType) {
String useDateStr = '';
if (keyType == XSConstantMacro.keyTypeTime) {
@ -241,6 +249,8 @@ class BaseGetXController extends GetxController {
}
return result;
}
}
///Extension_Int

View File

@ -53,6 +53,7 @@ class KeySearchWidget extends StatelessWidget {
controller: editingController,
autofocus: false,
textAlign: TextAlign.start,
textInputAction: TextInputAction.search,
onChanged: (String value) {
AppLog.log('onChanged:$value');
},
@ -60,6 +61,7 @@ class KeySearchWidget extends StatelessWidget {
AppLog.log('onEditingComplete:');
},
onSubmitted: (String value) {
FocusScope.of(context).unfocus(); //
onSubmittedAction!();
},
decoration: InputDecoration(

View File

@ -64,6 +64,7 @@ class _TitleAppBarState extends State<TitleAppBar> {
EasyLoading.dismiss();
}
Navigator.pop(context);
FocusScope.of(context).unfocus(); //
}
})
: Container()),

View File

@ -6,20 +6,16 @@ if [[ "${CI_COMMIT_BRANCH}" == "release_sky" ]] ; then
WECAHT_WEBHOOK_URL=$PRE_QYWECAHT_WEBHOOK_URL
SKY_IOS_DOWNLOAD_URL=$PRE_SKY_IOS_DOWNLOAD_URL
SKY_ANDROID_DOWNLOAD_URL=$PRE_SKY_ANDROID_DOWNLOAD_URL
XHJ_IOS_DOWNLOAD_URL=$PRE_XHJ_IOS_DOWNLOAD_URL
XHJ_ANDROID_DOWNLOAD_URL=$PRE_XHJ_ANDROID_DOWNLOAD_URL
elif [[ "${CI_COMMIT_BRANCH}" == "develop_sky" ]] || [[ "${CI_COMMIT_BRANCH}" == "feat_devops_sky" ]]; then
WECAHT_WEBHOOK_URL=$DEV_QYWECAHT_WEBHOOK_URL
SKY_IOS_DOWNLOAD_URL=$DEV_SKY_IOS_DOWNLOAD_URL
SKY_ANDROID_DOWNLOAD_URL=$DEV_SKY_ANDROID_DOWNLOAD_URL
XHJ_IOS_DOWNLOAD_URL=$DEV_XHJ_IOS_DOWNLOAD_URL
XHJ_ANDROID_DOWNLOAD_URL=$DEV_XHJ_ANDROID_DOWNLOAD_URL
fi
if [[ "${BUILD_STATUS}" == "success" ]]; then
TITLE="😎 构建成功"
BUILD_STATUS_DESC="成功"
NOTIFICATION_CONENT='{"msgtype":"markdown","markdown":{"content":"'$TITLE'\n> **项目名称**: '$APP_PRODUCT_NAME'\n> **分支**: '$CI_COMMIT_REF_NAME'\n> **构建状态**: '$BUILD_STATUS_DESC'\n> **安装地址**:\n 锁通通 ** [iOS]('$SKY_IOS_DOWNLOAD_URL') ** ** [Android]('$SKY_ANDROID_DOWNLOAD_URL')**\n > ** 星星锁 ** [iOS]('$XHJ_IOS_DOWNLOAD_URL') ** ** [Android]('$XHJ_ANDROID_DOWNLOAD_URL')** \n> **详情查看**: [构建日志]('$CI_JOB_URL')"}}'
NOTIFICATION_CONENT='{"msgtype":"markdown","markdown":{"content":"'$TITLE'\n> **项目名称**: '$APP_PRODUCT_NAME'\n> **分支**: '$CI_COMMIT_REF_NAME'\n> **构建状态**: '$BUILD_STATUS_DESC'\n> **安装地址**:\n 锁通通 ** [iOS]('$SKY_IOS_DOWNLOAD_URL') ** ** [Android]('$SKY_ANDROID_DOWNLOAD_URL')** \n> **详情查看**: [构建日志]('$CI_JOB_URL')"}}'
else
TITLE="😥 部署失败"
BUILD_STATUS_DESC="失败"

View File

@ -60,27 +60,39 @@ else
[ -z "$patch" ] && patch=0
compare_json=""
if [[ "$1" == "generate_tag" ]];then
echo "generate_tag:$newest_sky_tag-to-master\n"
compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=$newest_sky_tag&to=master")
echo "generate_tag:$newest_sky_tag-to-master_sky\n"
compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=$newest_sky_tag&to=master_sky")
elif [[ "$1" == "generate_version" ]]; then
echo "generate_version:master-to-$CI_COMMIT_BRANCH\n"
compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=master&to=$CI_COMMIT_BRANCH")
echo "generate_version:master_sky-to-$CI_COMMIT_BRANCH\n"
compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=master_sky&to=$CI_COMMIT_BRANCH")
fi
echo "compare_json:$compare_json\n"
new_patch=$patch
new_minor=$minor
seen_commits="" # 用于去重
while IFS= read -r commit_json; do
commit_id=$(echo "$commit_json" | jq -r '.id')
commit_title=$(echo "$commit_json" | jq -r '.title')
commit_message=$(echo "$commit_json" | jq -r '.message')
# commit id 去重(兼容所有 shell
if echo "$seen_commits" | grep -q "$commit_id"; then
continue
fi
seen_commits="$seen_commits $commit_id"
# 跳过 Merge 和 Revert 提交
if [[ "$commit_title" =~ ^Merge ]] || [[ "$commit_title" =~ ^Revert ]]; then
continue
fi
echo "----$commit_message"
if [[ "$commit_message" =~ ("feat:"*) ]] && [[ $new_minor == $minor ]]; then
if [[ "$commit_message" =~ ^feat: ]] && [[ $new_minor == $minor ]]; then
((new_minor++))
elif [[ "$commit_message" =~ ("fix:"*) ]]; then
((new_patch++))
elif [[ ! "$commit_message" =~ ("Merge"* | "Revert"*) ]]; then
elif [[ "$commit_message" =~ ^fix: ]]; then
((new_patch++))
fi
done < <(echo "$compare_json" | jq -c '.commits[] | {id: .id, message: .message}')
done < <(echo "$compare_json" | jq -c '.commits[] | {id: .id, title: .title, message: .message}')
next_tag="v${major}.${new_minor}.${new_patch}_sky"
fi