-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfbbbf7
commit e37ec07
Showing
10 changed files
with
2,873 additions
and
2,767 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
This file was deleted.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Fail if anything errors | ||
set -eox pipefail | ||
|
||
# Build lifecycle hooks: https://docs.expo.dev/build-reference/npm-hooks/ | ||
# List of available environment variables: https://docs.expo.dev/build-reference/variables/#built-in-environment-variables | ||
# How to add secrets to environment variables: https://docs.expo.dev/build-reference/variables/#using-secrets-in-environment-variables | ||
|
||
# We only execute this command if the build runner is EAS Build | ||
# If user builds the app localy they need to manually choose when to run Sherlo tests | ||
if [[ "$EAS_BUILD_RUNNER" != "eas-build" ]]; then | ||
exit | ||
fi | ||
|
||
if [[ "$EAS_BUILD_PROFILE" == "preview" ]]; then | ||
|
||
if [[ "$EAS_BUILD_PLATFORM" == "android" ]]; then | ||
# Install jq to parse JSON | ||
sudo apt-get install jq -y | ||
|
||
# Details on Android build paths: https://docs.expo.dev/build-reference/android-builds/ | ||
android_path=$(jq -r '.builds.android."'"$EAS_BUILD_PROFILE"'"."applicationArchivePath"' eas.json) | ||
if [[ -z "$android_path" || "$android_path" == "null" ]]; then | ||
android_path="android/app/build/outputs/apk/release/app-release.apk" | ||
fi | ||
|
||
yarn sherlo --asyncUploadCommitHash=$EAS_BUILD_GIT_COMMIT_HASH --token=$SHERLO_TOKEN --android=$android_path | ||
fi | ||
|
||
if [[ "$EAS_BUILD_PLATFORM" == "ios" ]]; then | ||
# Install jq to parse JSON | ||
brew update | ||
brew install jq | ||
|
||
# Details on iOS build paths: https://docs.expo.dev/build-reference/ios-builds/ | ||
ios_path=$(jq -r '.builds.ios."'"$EAS_BUILD_PROFILE"'"."applicationArchivePath"' eas.json) | ||
if [[ -z "$ios_path" || "$ios_path" == "null" ]]; then | ||
ios_path=$(find ios/build/Build/Products/Release-iphonesimulator -name "*.app" -print -quit) | ||
fi | ||
|
||
yarn sherlo --asyncUploadCommitHash=$EAS_BUILD_GIT_COMMIT_HASH --token=$SHERLO_TOKEN --ios=$ios_path | ||
fi | ||
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
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