-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Updated XCloud script for status check (#292)
* ci: Updated XCloud script for status check * ci: Fixed script issue * ci: Fixed script issue * ci: Fixed script issue * ci: Fixed script issue * ci: Fixed script issue
- Loading branch information
1 parent
6bc1166
commit 44b7b1f
Showing
4 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
if [[ -n $CI_PULL_REQUEST_NUMBER ]]; | ||
then | ||
brew install gh | ||
|
||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/$CI_PULL_REQUEST_SOURCE_REPO/statuses/$CI_COMMIT \ | ||
-f state='pending' \ | ||
-f description='XCloud Building...' \ | ||
-f context='API Status Checker' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
#!/bin/zsh | ||
# ci_post_xcodebuild.sh | ||
#!/bin/bash | ||
|
||
if [[ "$CI_WORKFLOW" == "Canary Deploy" ]]; then | ||
TESTFLIGHT_DIR_PATH=../TestFlight | ||
mkdir $TESTFLIGHT_DIR_PATH | ||
echo "CI 自动生成信息,24小时内的main分支的提交:\n" > $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt | ||
git fetch -a --deepen 40 && git log --since="24 hours ago" main --pretty=format:"%s" >! $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt | ||
git fetch -a --deepen 40 && git log --since="24 hours ago" main --pretty=format:"%s" >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt | ||
elif [[ "$CI_WORKFLOW" == "Public Release" ]]; then | ||
TESTFLIGHT_DIR_PATH=../TestFlight | ||
mkdir $TESTFLIGHT_DIR_PATH | ||
echo "当前语义化版本:$CI_TAG\n\nRelease Notes: https://github.com/Darock-Studio/Darock-Bili/releases/tag/$CI_TAG\n\n若要使用watchOS App,请打开“在Apple Watch上显示App”开关" > $TESTFLIGHT_DIR_PATH/WhatToTest.zh-Hans.txt | ||
fi | ||
|
||
if [[ -n $CI_PULL_REQUEST_NUMBER ]]; then | ||
if [[ "$CI_XCODEBUILD_EXIT_CODE" == "0" ]]; then | ||
NEW_STATUS=success | ||
else | ||
NEW_STATUS=failure | ||
fi | ||
|
||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/$CI_PULL_REQUEST_SOURCE_REPO/statuses/$CI_COMMIT \ | ||
-f state=$NEW_STATUS \ | ||
-f context='API Status Checker' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/zsh | ||
#!/bin/bash | ||
|
||
if [ "$CI_WORKFLOW" = "Canary Deploy" ]; then | ||
NEW_TEXT="Canary" | ||
|