Skip to content

Commit

Permalink
Merge pull request #273 from Darock-Studio/fix/ci
Browse files Browse the repository at this point in the history
fix: Fixed Xcode Cloud can't set WhatToTest text
  • Loading branch information
WindowsMEMZ authored Feb 23, 2024
2 parents 57bf19b + c3d9396 commit e870d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions DarockBili.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
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 */; };
8CB0D02A2B88E5B20057EF1C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = E2B720932B67858E00ABB0A6 /* Localizable.xcstrings */; };
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 */; };
Expand Down Expand Up @@ -1109,6 +1110,7 @@
files = (
8CC5B6FA2B873FA000BAD89E /* Assets.xcassets in Resources */,
8CB0D0292B88D67D0057EF1C /* CurrentChannel.drkdatac in Resources */,
8CB0D02A2B88E5B20057EF1C /* Localizable.xcstrings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
4 changes: 2 additions & 2 deletions ci_scripts/ci_post_xcodebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ 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-Hans.txt
git fetch && git log --since="24 hours ago" -p main >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt
git fetch && git log --since="24 hours ago" -p main --pretty=format:"%s" >> $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
sed -i '' "1,3900d" $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt

# 在文件末尾添加提示文本
echo "\n由于超过字符限制,剩余内容被截断,完整diff请见喵哩喵哩GitHub页" >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt
Expand Down

0 comments on commit e870d9d

Please sign in to comment.