Skip to content

Commit

Permalink
Merge branch 'main' into Rory-FixCrashInReportFooter
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/pages/home/report/ReportFooter.tsx
  • Loading branch information
roryabraham committed Jun 7, 2024
2 parents cbc98e2 + 2424674 commit 0f5c6fb
Show file tree
Hide file tree
Showing 282 changed files with 4,725 additions and 2,457 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ USE_WEB_PROXY=false
USE_WDYR=false
CAPTURE_METRICS=false
ONYX_METRICS=false
GOOGLE_GEOLOCATION_API_KEY=AIzaSyBqg6bMvQU7cPWDKhhzpYqJrTEnSorpiLI

EXPENSIFY_ACCOUNT_ID_ACCOUNTING=-1
EXPENSIFY_ACCOUNT_ID_ADMIN=-1
Expand Down
1 change: 0 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ PUSHER_APP_KEY=268df511a204fbb60884
USE_WEB_PROXY=false
ENVIRONMENT=production
SEND_CRASH_REPORTS=true
GOOGLE_GEOLOCATION_API_KEY=AIzaSyBFKujMpzExz0_z2pAGfPUwkmlaUc-uw1Q
3 changes: 1 addition & 2 deletions .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66
PUSHER_APP_KEY=268df511a204fbb60884
USE_WEB_PROXY=false
ENVIRONMENT=staging
SEND_CRASH_REPORTS=true
GOOGLE_GEOLOCATION_API_KEY=AIzaSyD2T1mlByThbUN88O8OPOD8vKuMMwLD4-M
SEND_CRASH_REPORTS=true
35 changes: 35 additions & 0 deletions .github/scripts/printPodspec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env ruby

# This file is a lightweight port of the `pod ipc spec` command.
# It was built from scratch to imports some 3rd party functions before reading podspecs

require 'cocoapods'
require 'json'

# Require 3rd party functions needed to parse podspecs. This code is copied from ios/Podfile
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

# Configure pod in silent mode
Pod::Config.instance.silent = true

# Process command-line arguments
podspec_files = ARGV

# Validate each podspec file
podspec_files.each do |podspec_file|
begin
spec = Pod::Specification.from_file(podspec_file)
puts(spec.to_pretty_json)
rescue => e
STDERR.puts "Failed to validate #{podspec_file}: #{e.message}"
end
end
50 changes: 28 additions & 22 deletions .github/scripts/verifyPodfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ source scripts/shellUtils.sh

title "Verifying that Podfile.lock is synced with the project"

declare EXIT_CODE=0
# Cleanup and exit
# param - status code
function cleanupAndExit {
cd "$START_DIR" || exit 1
exit "$1"
}

# Check Provisioning Style. If automatic signing is enabled, iOS builds will fail, so ensure we always have the proper profile specified
info "Verifying that automatic signing is not enabled"
if grep -q 'PROVISIONING_PROFILE_SPECIFIER = "(NewApp) AppStore"' ios/NewExpensify.xcodeproj/project.pbxproj; then
success "Automatic signing not enabled"
else
error "Error: Automatic provisioning style is not allowed!"
EXIT_CODE=1
cleanupAndExit 1
fi

PODFILE_SHA=$(openssl sha1 ios/Podfile | awk '{print $2}')
Expand All @@ -29,7 +34,7 @@ if [[ "$PODFILE_SHA" == "$PODFILE_LOCK_SHA" ]]; then
success "Podfile checksum verified!"
else
error "Podfile.lock checksum mismatch. Did you forget to run \`npx pod-install\`?"
EXIT_CODE=1
cleanupAndExit 1
fi

info "Ensuring correct version of cocoapods is used..."
Expand All @@ -45,45 +50,46 @@ if [[ "$POD_VERSION_FROM_GEMFILE" == "$POD_VERSION_FROM_PODFILE_LOCK" ]]; then
success "Cocoapods version from Podfile.lock matches cocoapods version from Gemfile"
else
error "Cocoapods version from Podfile.lock does not match cocoapods version from Gemfile. Please use \`npm run pod-install\` or \`bundle exec pod install\` instead of \`pod install\` to install pods."
EXIT_CODE=1
cleanupAndExit 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)
if ! SPEC_DIRS=$(yq '.["EXTERNAL SOURCES"].[].":path" | select( . == "*node_modules*")' < ios/Podfile.lock); then
error "Error: Could not parse podspec directories from Podfile.lock"
cleanupAndExit 1
fi

if ! read_lines_into_array PODSPEC_PATHS < <(npx react-native config | jq --raw-output '.dependencies[].platforms.ios.podspecPath | select ( . != null)'); then
error "Error: could not parse podspec paths from react-native config command"
cleanupAndExit 1
fi

# 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
)"
)
if ! FORMATTED_PODS=$( \
jq --raw-output --slurp 'map((.name + " (" + .version + ")")) | .[]' <<< "$(./.github/scripts/printPodspec.rb "${PODSPEC_PATHS[@]}")" \
); then
error "Error: could not parse podspecs at paths parsed from react-native config"
cleanupAndExit 1
fi

# 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
cleanupAndExit 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
cleanupAndExit 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
success "Podfile.lock is up to date."
cleanupAndExit 0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.13.0
20.14.0
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001047909
versionName "1.4.79-9"
versionCode 1001048014
versionName "1.4.80-14"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
14 changes: 14 additions & 0 deletions assets/images/credit-card-exclamation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion assets/images/emptystate__routepending.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/inbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions assets/images/money-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0f5c6fb

Please sign in to comment.