Skip to content

Commit

Permalink
Add post build script in Xcode Cloud CI to set TestFlight message
Browse files Browse the repository at this point in the history
  • Loading branch information
mvasilak committed Aug 28, 2023
1 parent 2428260 commit 935b672
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Zotero.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
611486502A9CD511002EEBEF /* ci_post_xcodebuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ci_post_xcodebuild.sh; sourceTree = "<group>"; };
614D65812A79C9AC007CF449 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
614D65842A7BCC22007CF449 /* ci_post_clone.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ci_post_clone.sh; sourceTree = "<group>"; };
61ABA7502A6137D1002A4219 /* ShareableImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareableImage.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3951,8 +3952,9 @@
B3F6415E2A28B1EF00A78CB0 /* ci_scripts */ = {
isa = PBXGroup;
children = (
B3F6415F2A28B21E00A78CB0 /* ci_pre_xcodebuild.sh */,
614D65842A7BCC22007CF449 /* ci_post_clone.sh */,
B3F6415F2A28B21E00A78CB0 /* ci_pre_xcodebuild.sh */,
611486502A9CD511002EEBEF /* ci_post_xcodebuild.sh */,
);
path = ci_scripts;
sourceTree = "<group>";
Expand Down
19 changes: 19 additions & 0 deletions ci_scripts/ci_post_xcodebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# ci_post_xcodebuild.sh
# Zotero
#
# Created by Miltiadis Vasilakis on 28/8/23.
# Copyright © 2023 Corporation for Digital Scholarship. All rights reserved.

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"
branch: $CI_BRANCH
commit: $(git log -n 1 --pretty=format:"%h")
message: $(git log -n 1 --pretty=format:"%s")
EOF
fi
2 changes: 1 addition & 1 deletion ci_scripts/ci_pre_xcodebuild.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# pre-xcodebuild.sh
# ci_pre_xcodebuild.sh
# Zotero
#
# Created by Michal Rentka on 01.06.2023.
Expand Down

0 comments on commit 935b672

Please sign in to comment.