Merge branch 'develop_sky' into 'canary_release'

Develop sky

See merge request StarlockTeam/app-starlock!88
This commit is contained in:
李仪 2025-05-17 08:33:25 +00:00
commit fe955dd9bb
11 changed files with 95 additions and 139 deletions

View File

@ -18,7 +18,6 @@ variables:
rules: rules:
- if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "release" - if: $CI_COMMIT_BRANCH == "release"
- if: $CI_COMMIT_BRANCH == "release_sky"
- if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/ - if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/
- if: $CI_COMMIT_BRANCH == "canary_release" - if: $CI_COMMIT_BRANCH == "canary_release"
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$/ - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$/
@ -30,7 +29,6 @@ variables:
rules: rules:
- if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "release" - if: $CI_COMMIT_BRANCH == "release"
- if: $CI_COMMIT_BRANCH == "release_sky"
- if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/ - if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/
.generate_tag_rule: .generate_tag_rule:
@ -39,7 +37,6 @@ variables:
- flutter - flutter
rules: rules:
- if: $CI_COMMIT_BRANCH == "master" - if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "master_sky"
.generate_next_version_rule: .generate_next_version_rule:
tags: tags:
@ -48,7 +45,6 @@ variables:
rules: rules:
- if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "release" - if: $CI_COMMIT_BRANCH == "release"
- if: $CI_COMMIT_BRANCH == "release_sky"
- if: $CI_COMMIT_BRANCH == "canary_release" - if: $CI_COMMIT_BRANCH == "canary_release"
- if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/ - if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/
@ -64,31 +60,10 @@ variables:
.setup_fastlane_android: .setup_fastlane_android:
extends: .build_rule extends: .build_rule
before_script: before_script:
- rm -rf ~/.gem ~/.bundle vendor/bundle_android # 强烈建议每次清理,防止并发/缓存污染
- export PATH="$HOME/.rbenv/bin:$PATH"
- eval "$(rbenv init -)"
- rbenv global 2.7.8
- export PATH="$HOME/.rbenv/shims:$PATH"
- which ruby # 输出当前使用的ruby路径便于调试
- ruby -v # 输出当前ruby版本便于调试
- gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ # 如在国外可移除此行
- bundle config mirror.https://rubygems.org https://mirrors.aliyun.com/rubygems/
- bundle -v || gem install bundler --source https://gems.ruby-china.com/
- ls -li - ls -li
- export NEXT_VERSION="$(cat app_new.version)" - export NEXT_VERSION="$(cat app_new.version)"
- bundle config set --local path 'vendor/bundle_android' # Android独立依赖目录 # - flutter pub get
- bundle install --gemfile android/Gemfile # 去掉--quiet便于观察进度 - bundle install --gemfile android/Gemfile --quiet
- gem pristine --all || true # 修复所有未编译的gem扩展
script:
# 输出调试信息,便于后续排查环境问题
- echo "=== DEBUG INFO (android) ==="
- which ruby
- ruby -v
- which gem
- gem -v
- echo $PATH
- env
- bash android/build.sh
cache: cache:
paths: paths:
- app_new.version - app_new.version
@ -96,31 +71,10 @@ variables:
.setup_fastlane_ios: .setup_fastlane_ios:
extends: .build_rule extends: .build_rule
before_script: before_script:
- rm -rf ~/.gem ~/.bundle vendor/bundle_ios # 强烈建议每次清理,防止并发/缓存污染
- export PATH="$HOME/.rbenv/bin:$PATH"
- eval "$(rbenv init -)"
- rbenv global 2.7.8
- export PATH="$HOME/.rbenv/shims:$PATH"
- which ruby # 输出当前使用的ruby路径便于调试
- ruby -v # 输出当前ruby版本便于调试
- gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ # 如在国外可移除此行
- bundle config mirror.https://rubygems.org https://gems.ruby-china.com
- bundle -v || gem install bundler --source https://gems.ruby-china.com/
- ls -li - ls -li
- export NEXT_VERSION="$(cat app_new.version)" - export NEXT_VERSION="$(cat app_new.version)"
- bundle config set --local path 'vendor/bundle_ios' # iOS独立依赖目录 # - flutter pub get
- bundle install --gemfile ios/Gemfile # 去掉--quiet便于观察进度 - bundle install --gemfile ios/Gemfile --quiet
- gem pristine --all || true # 修复所有未编译的gem扩展
script:
# 输出调试信息,便于后续排查环境问题
- echo "=== DEBUG INFO (ios) ==="
- which ruby
- ruby -v
- which gem
- gem -v
- echo $PATH
- env
- bash ios/build.sh
cache: cache:
paths: paths:
- app_new.version - app_new.version
@ -159,15 +113,7 @@ generate_next_version:
build_android: build_android:
stage: build-artifacts stage: build-artifacts
extends: .setup_fastlane_android extends: .setup_fastlane_android
script: script: bash android/build.sh
- echo "=== DEBUG INFO (android) ==="
- which ruby
- ruby -v
- which gem
- gem -v
- echo $PATH
- env
- bash android/build.sh
artifacts: artifacts:
paths: paths:
- build/app/outputs/flutter-apk/ - build/app/outputs/flutter-apk/
@ -176,13 +122,6 @@ build_ios:
stage: build-artifacts stage: build-artifacts
extends: .setup_fastlane_ios extends: .setup_fastlane_ios
script: script:
- echo "=== DEBUG INFO (ios) ==="
- which ruby
- ruby -v
- which gem
- gem -v
- echo $PATH
- env
- bash ios/build.sh - bash ios/build.sh
artifacts: artifacts:
paths: paths:

View File

@ -1,7 +1,6 @@
source "https://mirrors.aliyun.com/rubygems/" source "https://rubygems.org"
gem "fastlane" gem "fastlane"
gem 'nkf', '0.2.0'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path) eval_gemfile(plugins_path) if File.exist?(plugins_path)

View File

@ -8,29 +8,41 @@ export ENV_BUILD_WORKSPACE=${CI_PROJECT_DIR}
echo "GITLAB_WORKSPACE: ${CI_PROJECT_DIR}" echo "GITLAB_WORKSPACE: ${CI_PROJECT_DIR}"
cd ${CI_PROJECT_DIR}/android cd ${CI_PROJECT_DIR}/android
echo "ENV_BUILD_TAG:${ENV_BUILD_TAG},ENV_BUILD_BRANCH:${ENV_BUILD_BRANCH}" echo "ENV_BUILD_TAG:${ENV_BUILD_TAG},ENV_BUILD_BRANCH:${ENV_BUILD_BRANCH}"
regex='^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$' regex='^(sky_)?v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$'
if [[ "${ENV_BUILD_BRANCH}" == "canary_release" ]]; then if [[ "${ENV_BUILD_BRANCH}" == "canary_release" ]]; then
echo "===build canary_release: ${NEXT_VERSION}" echo "===build canary_release: ${NEXT_VERSION}"
export ENV_BUILD_TAG=${NEXT_VERSION} export ENV_BUILD_TAG=${NEXT_VERSION}
bundle exec fastlane release_apk flavor:xhj --verbose bundle exec fastlane release_apk flavor:xhj --verbose || { echo "[FATAL] fastlane release_apk xhj 失败"; exit 10; }
bundle exec fastlane release_apk flavor:sky --verbose bundle exec fastlane release_apk flavor:sky --verbose || { echo "[FATAL] fastlane release_apk sky 失败"; exit 11; }
elif [[ $ENV_BUILD_TAG =~ $regex ]]; then elif [[ $ENV_BUILD_TAG =~ $regex ]]; then
echo "===build release===$ENV_BUILD_TAG" echo "===build release===$ENV_BUILD_TAG"
bundle exec fastlane release_apk flavor:xhj --verbose bundle exec fastlane release_apk flavor:xhj --verbose || { echo "[FATAL] fastlane release_apk xhj 失败"; exit 10; }
bundle exec fastlane release_apk flavor:sky --verbose bundle exec fastlane release_apk flavor:sky --verbose || { echo "[FATAL] fastlane release_apk sky 失败"; exit 11; }
bundle exec fastlane release_bundle flavor:xhj_bundle --verbose bundle exec fastlane release_bundle flavor:xhj_bundle --verbose || { echo "[FATAL] fastlane release_bundle xhj_bundle 失败"; exit 12; }
bundle exec fastlane release_bundle flavor:sky --verbose bundle exec fastlane release_bundle flavor:sky --verbose || { echo "[FATAL] fastlane release_bundle sky 失败"; exit 13; }
echo "=== fastlane lane 结束,检查产物目录(前) ==="
ls -lh build/app/outputs/flutter-apk/ || true
ls -lh build/app/outputs/bundle/ || true
if [ ! -d build/app/outputs/flutter-apk/ ]; then
echo "❌ 产物目录 build/app/outputs/flutter-apk/ 未生成,构建失败!"
echo "=== 产物目录消失时build/app/outputs/ 内容如下 ==="
ls -lh build/app/outputs/ || true
ls -lh build/app/outputs/bundle/ || true
exit 99
fi
echo "=== 产物目录检查通过,最终内容如下 ==="
ls -l build/app/outputs/flutter-apk/
elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then
echo "===build dev===${NEXT_VERSION}" echo "===build dev===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:dev --verbose bundle exec fastlane beta flavor:xhj env:dev --verbose || { echo "[FATAL] fastlane beta xhj dev 失败"; exit 20; }
bundle exec fastlane beta flavor:sky env:dev --verbose bundle exec fastlane beta flavor:sky env:dev --verbose || { echo "[FATAL] fastlane beta sky dev 失败"; exit 21; }
elif [[ "${ENV_BUILD_BRANCH}" == "release" ]] || [[ "${ENV_BUILD_BRANCH}" == "feat_devops" ]] ; then elif [[ "${ENV_BUILD_BRANCH}" == "release" ]] || [[ "${ENV_BUILD_BRANCH}" == "feat_devops" ]] ; then
echo "===build pre===${NEXT_VERSION}" echo "===build pre===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:pre --verbose bundle exec fastlane beta flavor:xhj env:pre --verbose || { echo "[FATAL] fastlane beta xhj pre 失败"; exit 30; }
bundle exec fastlane beta flavor:sky env:pre --verbose bundle exec fastlane beta flavor:sky env:pre --verbose || { echo "[FATAL] fastlane beta sky pre 失败"; exit 31; }
elif [[ "${ENV_BUILD_BRANCH}" == "release_sky" ]]; then elif [[ "${ENV_BUILD_BRANCH}" == "release_sky" ]]; then
echo "===build release_sky===${NEXT_VERSION}" echo "===build release_sky===${NEXT_VERSION}"
bundle exec fastlane release_apk flavor:sky --verbose bundle exec fastlane release_apk flavor:sky --verbose || { echo "[FATAL] fastlane release_apk sky 失败"; exit 40; }
bundle exec fastlane release_bundle flavor:sky --verbose bundle exec fastlane release_bundle flavor:sky --verbose || { echo "[FATAL] fastlane release_bundle sky 失败"; exit 41; }
fi fi
exit 0 exit 0

View File

@ -90,7 +90,7 @@ platform :android do
print_log "build flavor for: #{flavor}" print_log "build flavor for: #{flavor}"
build_number = Time.now.strftime("%Y%m%d%H") build_number = Time.now.strftime("%Y%m%d%H")
print_log "BuildNo #{build_number}" print_log "BuildNo #{build_number}"
build_version = $current_tag.match(/^(sky_)?v(\d+\.\d+\.\d+)/).captures.last build_version = $current_tag.match(/^v(\d+\.\d+\.\d+)/).captures[0]
print_log "buildVersion #{build_version}" print_log "buildVersion #{build_version}"
commit_hash = last_git_commit commit_hash = last_git_commit
short_hash = commit_hash[:abbreviated_commit_hash] short_hash = commit_hash[:abbreviated_commit_hash]
@ -112,7 +112,7 @@ platform :android do
print_log "build flavor for: #{flavor}" print_log "build flavor for: #{flavor}"
build_number = Time.now.strftime("%Y%m%d%H") build_number = Time.now.strftime("%Y%m%d%H")
print_log "BuildNo #{build_number}" print_log "BuildNo #{build_number}"
build_version = $current_tag.match(/^(sky_)?v(\d+\.\d+\.\d+)/).captures.last build_version = $current_tag.match(/^v(\d+\.\d+\.\d+)/).captures[0]
print_log "buildVersion #{build_version}" print_log "buildVersion #{build_version}"
commit_hash = last_git_commit commit_hash = last_git_commit
short_hash = commit_hash[:abbreviated_commit_hash] short_hash = commit_hash[:abbreviated_commit_hash]

View File

@ -1,8 +1,7 @@
source "https://gems.ruby-china.com" source "https://rubygems.org"
gem "fastlane" gem "fastlane"
gem 'cocoapods', '1.14.3' gem 'cocoapods', '1.14.3'
gem 'public_suffix', '~> 4.0' gem 'public_suffix', '~> 4.0'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path) eval_gemfile(plugins_path) if File.exist?(plugins_path)
gem 'nkf', '0.2.0'

View File

@ -9,7 +9,7 @@ echo "GITLAB_WORKSPACE: ${CI_PROJECT_DIR}"
cd ${CI_PROJECT_DIR}/ios cd ${CI_PROJECT_DIR}/ios
#bundle exec pod install #bundle exec pod install
echo "ENV_BUILD_TAG:${ENV_BUILD_TAG},ENV_BUILD_BRANCH:${ENV_BUILD_BRANCH}" echo "ENV_BUILD_TAG:${ENV_BUILD_TAG},ENV_BUILD_BRANCH:${ENV_BUILD_BRANCH}"
regex='^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$' regex='^(sky_)?v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$'
# ==== 调试输出,确认环境和依赖 ==== # ==== 调试输出,确认环境和依赖 ====
echo "=== FASTLANE/GEM/ENV DEBUG ===" echo "=== FASTLANE/GEM/ENV DEBUG ==="
@ -25,19 +25,21 @@ gem list | grep digest-crc
if [[ "${ENV_BUILD_BRANCH}" == "canary_release" ]]; then if [[ "${ENV_BUILD_BRANCH}" == "canary_release" ]]; then
echo "===build canary_release: ${NEXT_VERSION}" echo "===build canary_release: ${NEXT_VERSION}"
export ENV_BUILD_TAG=${NEXT_VERSION} export ENV_BUILD_TAG=${NEXT_VERSION}
bundle exec fastlane release_ipa flavor:xhj --verbose bundle exec fastlane release_ipa flavor:xhj --verbose || { echo "[FATAL] fastlane release_ipa xhj 失败"; exit 10; }
bundle exec fastlane release_ipa flavor:sky --verbose bundle exec fastlane release_ipa flavor:sky --verbose || { echo "[FATAL] fastlane release_ipa sky 失败"; exit 11; }
elif [[ $ENV_BUILD_TAG =~ $regex ]]; then elif [[ $ENV_BUILD_TAG =~ $regex ]]; then
echo "===build release===$ENV_BUILD_TAG" echo "===build release===$ENV_BUILD_TAG"
bundle exec fastlane release_ipa flavor:xhj --verbose # 无论tag前缀均构建xhj和sky的ipa
bundle exec fastlane release_ipa flavor:sky --verbose bundle exec fastlane release_ipa flavor:xhj --verbose || { echo "[FATAL] fastlane release_ipa xhj 失败"; exit 10; }
bundle exec fastlane release_ipa flavor:sky --verbose || { echo "[FATAL] fastlane release_ipa sky 失败"; exit 11; }
ls -l build/app/outputs/flutter-ipa/
elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then
echo "===build dev===${NEXT_VERSION}" echo "===build dev===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:Dev --verbose bundle exec fastlane beta flavor:xhj env:Dev --verbose || { echo "[FATAL] fastlane beta xhj Dev 失败"; exit 20; }
bundle exec fastlane beta flavor:sky env:Dev --verbose bundle exec fastlane beta flavor:sky env:Dev --verbose || { echo "[FATAL] fastlane beta sky Dev 失败"; exit 21; }
elif [[ "${ENV_BUILD_BRANCH}" == "release" ]] || [[ "${ENV_BUILD_BRANCH}" == "feat_devops" ]] ; then elif [[ "${ENV_BUILD_BRANCH}" == "release" ]] || [[ "${ENV_BUILD_BRANCH}" == "feat_devops" ]] ; then
echo "===build pre===${NEXT_VERSION}" echo "===build pre===${NEXT_VERSION}"
bundle exec fastlane beta flavor:xhj env:Pre --verbose bundle exec fastlane beta flavor:xhj env:Pre --verbose || { echo "[FATAL] fastlane beta xhj Pre 失败"; exit 30; }
bundle exec fastlane beta flavor:sky env:Pre --verbose bundle exec fastlane beta flavor:sky env:Pre --verbose || { echo "[FATAL] fastlane beta sky Pre 失败"; exit 31; }
fi fi
exit 0 exit 0

View File

@ -158,23 +158,23 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
allHeight: 70.h, allHeight: 70.h,
isHaveLine: true), isHaveLine: true),
)), )),
Obx(() => CommonItem( // Obx(() => CommonItem(
leftTitel: '位置信息'.tr, // leftTitel: '位置信息'.tr,
// rightTitle: state.lockBasicInfo.value.address ?? "-", // // rightTitle: state.lockBasicInfo.value.address ?? "-",
allHeight: 80.h, // allHeight: 80.h,
isHaveLine: false, // isHaveLine: false,
isHaveRightWidget: true, // isHaveRightWidget: true,
rightWidget: SizedBox( // rightWidget: SizedBox(
width: 300.w, // width: 300.w,
child: Text(state.lockBasicInfo.value.address ?? ''.tr, // child: Text(state.lockBasicInfo.value.address ?? ''.tr,
maxLines: 2, // maxLines: 2,
overflow: TextOverflow.ellipsis, // overflow: TextOverflow.ellipsis,
textAlign: TextAlign.end, // textAlign: TextAlign.end,
style: TextStyle( // style: TextStyle(
fontSize: 22.sp, // fontSize: 22.sp,
color: AppColors.darkGrayTextColor)), // color: AppColors.darkGrayTextColor)),
), // ),
)), // )),
/* 2024-01-12 by DaisyWu /* 2024-01-12 by DaisyWu
CommonItem( CommonItem(
leftTitel: leftTitel:

View File

@ -237,15 +237,18 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
if (isH264) { if (isH264) {
// H264H264视频和G711音频期望 // H264H264视频和G711音频期望
startChartManage.sendOnlyH264VideoTalkExpectData(); startChartManage.sendOnlyH264VideoTalkExpectData();
print('app收到的对讲请求后发送的预期数据=========锁支持H264发送H264视频格式期望数据'); print(
'app收到的对讲请求后发送的预期数据=========锁支持H264发送H264视频格式期望数据,peerID=${lockPeerID}');
} else if (isMJpeg) { } else if (isMJpeg) {
// MJPEGG711音频期望 // MJPEGG711音频期望
startChartManage.sendOnlyImageVideoTalkExpectData(); startChartManage.sendOnlyImageVideoTalkExpectData();
print('app收到的对讲请求后发送的预期数据=========锁不支持H264支持MJPEG发送MJPEG视频格式期望数据'); print(
'app收到的对讲请求后发送的预期数据=========锁不支持H264支持MJPEG发送MJPEG视频格式期望数据,peerID=${lockPeerID}');
} else { } else {
// 使 // 使
startChartManage.sendOnlyImageVideoTalkExpectData(); startChartManage.sendOnlyImageVideoTalkExpectData();
print('app收到的对讲请求后发送的预期数据=========锁不支持H264和MJPEG默认发送图像视频格式期望数据'); print(
'app收到的对讲请求后发送的预期数据=========锁不支持H264和MJPEG默认发送MJPEG视频格式期望数据,peerID=${lockPeerID}');
} }
} }
@ -281,15 +284,18 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
if (isH264) { if (isH264) {
// H264H264视频和G711音频期望 // H264H264视频和G711音频期望
startChartManage.sendH264VideoAndG711AudioTalkExpectData(); startChartManage.sendH264VideoAndG711AudioTalkExpectData();
print('app主动发请求收到回复后发送的预期数据=======锁支持H264发送H264视频格式期望数据'); AppLog.log(
'app主动发对讲请求收到回复后发送的预期数据=======锁支持H264发送H264视频格式期望数据,peerID=${lockPeerID}');
} else if (isMJpeg) { } else if (isMJpeg) {
// MJPEGG711音频期望 // MJPEGG711音频期望
startChartManage.sendImageVideoAndG711AudioTalkExpectData(); startChartManage.sendImageVideoAndG711AudioTalkExpectData();
print('app主动发请求收到回复后发送的预期数据=======锁不支持H264支持MJPEG发送MJPEG视频格式期望数据'); AppLog.log(
'app主动发对讲请求收到回复后发送的预期数据=======锁不支持H264支持MJPEG发送MJPEG视频格式期望数据,peerID=${lockPeerID}');
} else { } else {
// 使 // 使
startChartManage.sendImageVideoAndG711AudioTalkExpectData(); startChartManage.sendImageVideoAndG711AudioTalkExpectData();
print('app主动发请求收到回复后发送的预期数据=======锁不支持H264和MJPEG默认发送图像视频格式期望数据'); AppLog.log(
'app主动发对讲请求收到回复后发送的预期数据=======锁不支持H264和MJPEG默认发送MJPEG视频格式期望数据,peerID=${lockPeerID}');
} }
} }
} }

View File

@ -61,7 +61,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
barTitle: '图传'.tr, barTitle: '图传'.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
backAction: (){ backAction: () {
logic.udpHangUpAction(); logic.udpHangUpAction();
}, },
), ),
@ -183,10 +183,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
icon: Icons.camera_alt, icon: Icons.camera_alt,
color: Colors.blue, color: Colors.blue,
onTap: () async { onTap: () async {
if (state.talkStatus.value == await logic.captureAndSavePng();
TalkStatus.answeredSuccessfully) {
await logic.captureAndSavePng();
}
}, },
), ),
], ],
@ -200,7 +197,10 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
outerColor: Colors.amber.withOpacity(0.15), outerColor: Colors.amber.withOpacity(0.15),
sliderButtonIcon: Icon(Icons.lock, color: Colors.white, size: 40.w), sliderButtonIcon: Icon(Icons.lock, color: Colors.white, size: 40.w),
text: '滑动解锁', text: '滑动解锁',
textStyle: TextStyle(fontSize: 26.sp, color: Colors.black54, fontWeight: FontWeight.bold), textStyle: TextStyle(
fontSize: 26.sp,
color: Colors.black54,
fontWeight: FontWeight.bold),
onSubmit: () { onSubmit: () {
// TODO: // TODO:
logic.remoteOpenLock(); logic.remoteOpenLock();

View File

@ -576,17 +576,25 @@ class TalkViewNativeDecodeLogic extends BaseGetXController {
/// ///
void updateTalkExpect() { void updateTalkExpect() {
// VideoTypeE的映射
final Map<String, VideoTypeE> qualityToVideoType = {
'标清': VideoTypeE.H264,
'高清': VideoTypeE.H264_720P,
//
};
TalkExpectReq talkExpectReq = TalkExpectReq(); TalkExpectReq talkExpectReq = TalkExpectReq();
state.isOpenVoice.value = !state.isOpenVoice.value; state.isOpenVoice.value = !state.isOpenVoice.value;
// videoType
VideoTypeE currentVideoType = qualityToVideoType[state.currentQuality.value] ?? VideoTypeE.H264;
if (!state.isOpenVoice.value) { if (!state.isOpenVoice.value) {
talkExpectReq = TalkExpectReq( talkExpectReq = TalkExpectReq(
videoType: [VideoTypeE.H264], videoType: [currentVideoType],
audioType: [], audioType: [],
); );
showToast('已静音'.tr); showToast('已静音'.tr);
} else { } else {
talkExpectReq = TalkExpectReq( talkExpectReq = TalkExpectReq(
videoType: [VideoTypeE.H264], videoType: [currentVideoType],
audioType: [AudioTypeE.G711], audioType: [AudioTypeE.G711],
); );
} }

View File

@ -15,17 +15,15 @@ if [ "$tags_length" -lt 1 ]; then
next_tag="v1.0.0" next_tag="v1.0.0"
else else
newest_tag=$(echo "$tags" | head -n 1) newest_tag=$(echo "$tags" | head -n 1)
# 去除已有的sky_前缀防止重复 IFS='.' read -r major minor patch <<< "$newest_tag"
base_tag=${newest_tag#sky_}
IFS='.' read -r major minor patch <<< "$base_tag"
major="${major#v}" major="${major#v}"
compare_json="" compare_json=""
if [[ "$1" == "generate_tag" ]];then if [[ "$1" == "generate_tag" ]];then
echo "generate_tag:$newest_tag-to-master_sky\n" echo "generate_tag:$newest_tag-to-master\n"
compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=$newest_tag&to=master_sky") compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=$newest_tag&to=master")
elif [[ "$1" == "generate_version" ]]; then elif [[ "$1" == "generate_version" ]]; then
echo "generate_version:master_sky-to-$CI_COMMIT_BRANCH\n" 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_sky&to=$CI_COMMIT_BRANCH") compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=master&to=$CI_COMMIT_BRANCH")
fi fi
echo "compare_json:$compare_json\n" echo "compare_json:$compare_json\n"
new_patch=$patch new_patch=$patch
@ -47,13 +45,6 @@ else
done < <(echo "$compare_json" | jq -c '.commits[] | {id: .id, message: .message}') done < <(echo "$compare_json" | jq -c '.commits[] | {id: .id, message: .message}')
next_tag="v$major.$new_minor.$new_patch" next_tag="v$major.$new_minor.$new_patch"
fi fi
# 生成新tag名时若在master_sky分支加前缀sky_
branch_name="$CI_COMMIT_BRANCH"
if [[ "$branch_name" == "master_sky" ]]; then
next_tag="sky_${next_tag}"
fi
echo "New Tag:$newest_tag;New version: $next_tag;command: $1" echo "New Tag:$newest_tag;New version: $next_tag;command: $1"
if [[ "$1" == "generate_tag" ]];then if [[ "$1" == "generate_tag" ]];then
if [ "$next_tag" == "$newest_tag" ]; then if [ "$next_tag" == "$newest_tag" ]; then