Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Xcode release #1449

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ tuist = '4.41.0'
periphery = '2.21.1'
swiftformat = '0.54.5'
swiftlint = '0.57.0'
sentry-cli = "latest"

Empty file added TestFlight/WhatToTest.en-GB.txt
Empty file.
Empty file added TestFlight/WhatToTest.fr-FR.txt
Empty file.
42 changes: 42 additions & 0 deletions ci_scripts/check_preconditions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
set -e

# CI_COMMIT - The Git commit hash that Xcode Cloud uses for the current build.
# SENTRY_URL - The URL of our self hosted Sentry.
# SENTRY_AUTH_TOKEN - The authentication token for Sentry.
# SENTRY_PROJECT - The project id in our Sentry.

# Ensure we have a commit hash
if [ -z "$CI_COMMIT" ]; then
echo "Error: CI_COMMIT variable is not set."
exit 1
fi

# Ensure SENTRY_URL is set
if [ -z "$SENTRY_URL" ]; then
echo "Error: SENTRY_URL variable is not set."
exit 1
fi

# Ensure SENTRY_AUTH_TOKEN is set
if [ -z "$SENTRY_AUTH_TOKEN" ]; then
echo "Error: SENTRY_AUTH_TOKEN variable is not set."
exit 1
fi

# Ensure SENTRY_PROJECT is set
if [ -z "$SENTRY_PROJECT" ]; then
echo "Error: SENTRY_PROJECT variable is not set."
exit 1
fi

# Retrieve the commit title from the given commit hash
commit_title="$(git log --format=%s -n 1 "$CI_COMMIT")"

# Check if the commit title begins with the expected string
if [[ "$commit_title" == chore:\ Release\ build* ]]; then
echo "Commit title is valid. Continuing..."
else
echo "Error: The commit title is not 'chore: Release build'."
exit 1
fi
15 changes: 15 additions & 0 deletions ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
set -e

./check_preconditions.sh

cd ..

curl https://mise.run | sh
export PATH="$HOME/.local/bin:$PATH"

mise install
eval "$(mise activate bash --shims)"

tuist install
tuist generate --no-open
21 changes: 21 additions & 0 deletions ci_scripts/ci_post_xcodebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
set -e

./check_preconditions.sh

cd ..

curl https://mise.run | sh
export PATH="$HOME/.local/bin:$PATH"

mise install
eval "$(mise activate bash --shims)"


if [[ -n $CI_ARCHIVE_PATH ]];
then
# Upload dSYMs
sentry-cli --url $SENTRY_URL --auth-token $SENTRY_AUTH_TOKEN upload-dif --org sentry --project $SENTRY_PROJECT $CI_ARCHIVE_PATH
else
echo "Archive path isn't available. Unable to run dSYMs uploading script."
fi
Loading