Skip to content

Commit

Permalink
Improve TestFlight message set by post build script in Xcode Cloud CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mvasilak committed Nov 14, 2023
1 parent d1a85fa commit e8f2651
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ci_scripts/ci_post_xcodebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ set -eo pipefail
if [[ -d "$CI_APP_STORE_SIGNED_APP_PATH" ]]; then
TESTFLIGHT_DIR_PATH=../TestFlight
mkdir -p $TESTFLIGHT_DIR_PATH
cat <<EOF > "$TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt"
TESTFLIGHT_FILE_PATH=$TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt

cat <<EOF > "$TESTFLIGHT_FILE_PATH"
(To unsubscribe from TestFlight emails, open the TestFlight app, tap on Zotero, and disable Email Notifications. We’re not able to unsubscribe you from TestFlight emails on our end.)
You’re using the beta version of Zotero for iOS. You can reinstall the production version of the app from the App Store at any time.
Expand All @@ -24,11 +26,14 @@ Please post to the Zotero Forums with all bug reports and feature requests.
Thanks for helping to test Zotero for iOS.
branch: ${CI_BRANCH:-$(git symbolic-ref --short HEAD)}
commit: $(git log -n 1 --pretty=format:"%h")
message: $(git log -n 1 --pretty=format:"%s")
EOF

if [[ -n "$CI_BRANCH" ]]; then
echo "branch: $CI_BRANCH" >> "$TESTFLIGHT_FILE_PATH"
fi
echo "commit: $(git log -n 1 --pretty=format:"%h")" >> "$TESTFLIGHT_FILE_PATH"
echo "message: $(git log -n 1 --pretty=format:"%s")" >> "$TESTFLIGHT_FILE_PATH"

# Push version-build tag to origin
VERSION=$(cat ../${CI_PRODUCT}.xcodeproj/project.pbxproj | grep -m1 'MARKETING_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' ')
TAG="${VERSION}-${CI_BUILD_NUMBER}"
Expand Down

0 comments on commit e8f2651

Please sign in to comment.