From 67f0c78760ec59d907b49f9bdae7b8334d49e794 Mon Sep 17 00:00:00 2001 From: Mark Chan <45706356+WindowsMEMZ@users.noreply.github.com> Date: Fri, 23 Feb 2024 22:09:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCI=E8=84=9A=E6=9C=AC=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E9=97=AE=E9=A2=98=20(#271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci(SwiftLint): Added script for Xcode Cloud * ci(Canary WhatToTest): Fixed permission issue * ci(Canary WhatToTest): Fixed file name issue --- CurrentChannel.drkdatac | 1 + DarockBili.xcodeproj/project.pbxproj | 10 ++++++++++ MeowBili/Others/AboutView.swift | 2 ++ ci_scripts/ci_post_xcodebuild.sh | 12 ++++++++++-- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 CurrentChannel.drkdatac diff --git a/CurrentChannel.drkdatac b/CurrentChannel.drkdatac new file mode 100644 index 000000000..1ee1f7b69 --- /dev/null +++ b/CurrentChannel.drkdatac @@ -0,0 +1 @@ +Unknown diff --git a/DarockBili.xcodeproj/project.pbxproj b/DarockBili.xcodeproj/project.pbxproj index ab30ce615..5e71c92d0 100644 --- a/DarockBili.xcodeproj/project.pbxproj +++ b/DarockBili.xcodeproj/project.pbxproj @@ -169,6 +169,10 @@ 8CA7CCDF2B77BB5A008E587F /* AlertKit in Frameworks */ = {isa = PBXBuildFile; productRef = 8CA7CCDE2B77BB5A008E587F /* AlertKit */; }; 8CA7CCE02B77C3A8008E587F /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = E2B720932B67858E00ABB0A6 /* Localizable.xcstrings */; }; 8CA7CCE12B77C3A9008E587F /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = E2B720932B67858E00ABB0A6 /* Localizable.xcstrings */; }; + 8CB0D0262B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */ = {isa = PBXBuildFile; fileRef = 8CB0D0252B88D67D0057EF1C /* CurrentChannel.drkdatac */; }; + 8CB0D0272B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */ = {isa = PBXBuildFile; fileRef = 8CB0D0252B88D67D0057EF1C /* CurrentChannel.drkdatac */; }; + 8CB0D0282B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */ = {isa = PBXBuildFile; fileRef = 8CB0D0252B88D67D0057EF1C /* CurrentChannel.drkdatac */; }; + 8CB0D0292B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */ = {isa = PBXBuildFile; fileRef = 8CB0D0252B88D67D0057EF1C /* CurrentChannel.drkdatac */; }; 8CBFF0B72B85E55F00350E0F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CA7CBC42B77AC4A008E587F /* ContentView.swift */; }; 8CBFF0B82B85E55F00350E0F /* CommentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CA7CCA52B77B314008E587F /* CommentsView.swift */; }; 8CBFF0B92B85E55F00350E0F /* LinkDetectText.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4DAF0DB2B80725800755F0C /* LinkDetectText.swift */; }; @@ -413,6 +417,7 @@ 8CA7CCDB2B77B571008E587F /* LiveMessagesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveMessagesView.swift; sourceTree = ""; }; 8CB0D0232B88CEC40057EF1C /* ci_post_xcodebuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ci_post_xcodebuild.sh; sourceTree = ""; }; 8CB0D0242B88D20F0057EF1C /* ci_pre_xcodebuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ci_pre_xcodebuild.sh; sourceTree = ""; }; + 8CB0D0252B88D67D0057EF1C /* CurrentChannel.drkdatac */ = {isa = PBXFileReference; lastKnownFileType = text; path = CurrentChannel.drkdatac; sourceTree = ""; }; 8CBFF1272B86188D00350E0F /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; 8CC3D5572B7CA209005636DC /* UserDynamicListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDynamicListView.swift; sourceTree = ""; }; 8CC3D5592B7CB95D005636DC /* NowPlayingExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NowPlayingExtension.m; sourceTree = ""; }; @@ -768,6 +773,7 @@ B44689C32B4FC15A002CCEB2 = { isa = PBXGroup; children = ( + 8CB0D0252B88D67D0057EF1C /* CurrentChannel.drkdatac */, 8CA370D92B82724400CE0E9E /* PrivacyInfo.xcprivacy */, E2B720932B67858E00ABB0A6 /* Localizable.xcstrings */, 8C72E32A2B6605B80087486E /* README.md */, @@ -1068,6 +1074,7 @@ 8CC5B6BF2B8652C000BAD89E /* Assets.xcassets in Resources */, 8CC5B6C02B86539700BAD89E /* BiliFont.ttf in Resources */, 8CC5B6C12B86539700BAD89E /* Localizable.xcstrings in Resources */, + 8CB0D0282B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1078,6 +1085,7 @@ 8CA7CBCA2B77AC4C008E587F /* Preview Assets.xcassets in Resources */, 8CA388A22B78B5D800F5F91F /* BiliFont.ttf in Resources */, 8CA7CBC72B77AC4C008E587F /* Assets.xcassets in Resources */, + 8CB0D0262B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */, 8CA370DB2B82724400CE0E9E /* PrivacyInfo.xcprivacy in Resources */, 8CA7CCE02B77C3A8008E587F /* Localizable.xcstrings in Resources */, ); @@ -1087,6 +1095,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8CB0D0272B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */, 8CA388A32B78B5D800F5F91F /* BiliFont.ttf in Resources */, 8CA370DC2B82724400CE0E9E /* PrivacyInfo.xcprivacy in Resources */, 8CA7CCE12B77C3A9008E587F /* Localizable.xcstrings in Resources */, @@ -1099,6 +1108,7 @@ buildActionMask = 2147483647; files = ( 8CC5B6FA2B873FA000BAD89E /* Assets.xcassets in Resources */, + 8CB0D0292B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MeowBili/Others/AboutView.swift b/MeowBili/Others/AboutView.swift index 14896ba22..5d5b99911 100644 --- a/MeowBili/Others/AboutView.swift +++ b/MeowBili/Others/AboutView.swift @@ -72,6 +72,8 @@ struct AboutApp: View { Group { Text("v\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String) Build \(Bundle.main.infoDictionary?["CFBundleVersion"] as! String)") .font(.system(size: 18)) + Text("\(Bundle.main.url(forResource: "CurrentChannel", withExtension: "drkdatac")!)") + .font(.system(size: 18)) Group { if debug { Text(CodingTime.getCodingTime()) diff --git a/ci_scripts/ci_post_xcodebuild.sh b/ci_scripts/ci_post_xcodebuild.sh index 85a73f681..75634416e 100755 --- a/ci_scripts/ci_post_xcodebuild.sh +++ b/ci_scripts/ci_post_xcodebuild.sh @@ -4,6 +4,14 @@ if [[ "$CI_WORKFLOW" == "Canary Deploy" ]]; then TESTFLIGHT_DIR_PATH=../TestFlight mkdir $TESTFLIGHT_DIR_PATH - echo "CI 自动生成信息,24小时内的main分支diff:\n" > $TESTFLIGHT_DIR_PATH/WhatToTest.zh-CN.txt - git fetch && git log --since="24 hours ago" -p main >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-CN.txt + echo "CI 自动生成信息,24小时内的main分支diff:\n" > $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt + git fetch && git log --since="24 hours ago" -p main >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt + CHAR_COUNT=$(wc -c < $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt) + if [ "$CHAR_COUNT" -gt 4000 ]; then + # 截取文件内容,保留前4000个字符 + sed -i '' "1,3950d" $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt + + # 在文件末尾添加提示文本 + echo "\n由于超过字符限制,剩余内容被截断,完整diff请见喵哩喵哩GitHub页" >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt + fi fi