-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14022 from Expensify/update-staging-from-main
Update version to 1.2.49-0 on staging
- Loading branch information
Showing
65 changed files
with
3,648 additions
and
285 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,64 @@ | ||
#!/bin/bash | ||
|
||
declare -r GREEN='\033[0;32m' | ||
declare -r RED='\033[0;31m' | ||
declare -r NC='\033[0m' | ||
START_DIR=$(pwd) | ||
ROOT_DIR=$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")") | ||
cd "$ROOT_DIR" || exit 1 | ||
|
||
podfileSha=$(openssl sha1 ios/Podfile | awk '{print $2}') | ||
podfileLockSha=$(awk '/PODFILE CHECKSUM: /{print $3}' ios/Podfile.lock) | ||
source scripts/shellUtils.sh | ||
|
||
echo "Podfile: $podfileSha" | ||
echo "Podfile.lock: $podfileLockSha" | ||
title "Verifying that Podfile.lock is synced with the project" | ||
|
||
if [ "$podfileSha" == "$podfileLockSha" ]; then | ||
echo -e "${GREEN}Podfile verified!${NC}" | ||
exit 0 | ||
declare EXIT_CODE=0 | ||
|
||
PODFILE_SHA=$(openssl sha1 ios/Podfile | awk '{print $2}') | ||
PODFILE_LOCK_SHA=$(awk '/PODFILE CHECKSUM: /{print $3}' ios/Podfile.lock) | ||
|
||
echo "Podfile: $PODFILE_SHA" | ||
echo "Podfile.lock: $PODFILE_LOCK_SHA" | ||
|
||
if [[ "$PODFILE_SHA" == "$PODFILE_LOCK_SHA" ]]; then | ||
success "Podfile checksum verified!" | ||
else | ||
echo -e "${RED}Error: Podfile.lock out of date with Podfile. Did you forget to run \`npx pod-install\`?${NC}" | ||
exit 1 | ||
error "Podfile.lock checksum mismatch. Did you forget to run \`npx pod-install\`?" | ||
EXIT_CODE=1 | ||
fi | ||
|
||
info "Comparing Podfile.lock with node packages..." | ||
|
||
# Retrieve a list of podspec directories as listed in the Podfile.lock | ||
SPEC_DIRS=$(yq '.["EXTERNAL SOURCES"].[].":path" | select( . == "*node_modules*")' < ios/Podfile.lock) | ||
|
||
# Format a list of Pods based on the output of the config command | ||
FORMATTED_PODS=$( \ | ||
jq --raw-output --slurp 'map((.name + " (" + .version + ")")) | .[]' <<< "$( \ | ||
npx react-native config | \ | ||
jq '.dependencies[].platforms.ios.podspecPath | select( . != null )' | \ | ||
xargs -L 1 pod ipc spec --silent | ||
)" | ||
) | ||
|
||
# Check for uncommitted package removals | ||
# If they are listed in Podfile.lock but the directories don't exist they have been removed | ||
while read -r DIR; do | ||
if [[ ! -d "${DIR#../}" ]]; then | ||
error "Directory \`${DIR#../node_modules/}\` not found in node_modules. Did you forget to run \`npx pod-install\` after removing the package?" | ||
EXIT_CODE=1 | ||
fi | ||
done <<< "$SPEC_DIRS" | ||
|
||
# Check for uncommitted package additions/updates | ||
while read -r POD; do | ||
if ! grep -q "$POD" ./ios/Podfile.lock; then | ||
error "$POD not found in Podfile.lock. Did you forget to run \`npx pod-install\`?" | ||
EXIT_CODE=1 | ||
fi | ||
done <<< "$FORMATTED_PODS" | ||
|
||
if [[ "$EXIT_CODE" == 0 ]]; then | ||
success "Podfile.lock is up to date." | ||
fi | ||
|
||
# Cleanup | ||
cd "$START_DIR" || exit 1 | ||
|
||
exit $EXIT_CODE |
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
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
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
Binary file not shown.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Oops, something went wrong.