Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/tienifr/App into fix/27927
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Oct 12, 2023
2 parents 18a0a9c + f942acd commit cdcf5af
Show file tree
Hide file tree
Showing 24 changed files with 476 additions and 121 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/staging'
steps:
- name: Checkout staging branch
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotifyApp@8c19d6da4a3d7ce3b15c9cd89a802187d208ecab
id: setupGitForOSBotify
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}

- name: Checkout staging branch
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
ref: staging
token: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}

- name: Tag version
run: git tag "$(npm run print-version --silent)"

Expand All @@ -32,20 +32,19 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/production'
steps:
- uses: actions/checkout@v3
name: Checkout
with:
ref: production
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupGitForOSBotifyApp@8c19d6da4a3d7ce3b15c9cd89a802187d208ecab
id: setupGitForOSBotify
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}

- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
ref: production
token: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}

- name: Get current app version
run: echo "PRODUCTION_VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT"
fi
env:
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Reopen and comment on issue (not a team member)
if: ${{ !fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) }}
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
COMMENT: |
Sorry, only members of @Expensify/Mobile-Deployers can close deploy checklists.
Expand All @@ -51,14 +51,14 @@ jobs:
id: checkDeployBlockers
uses: Expensify/App/.github/actions/javascript/checkDeployBlockers@main
with:
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

- name: Reopen and comment on issue (has blockers)
if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS || 'false') }}
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
COMMENT: |
This issue either has unchecked items or has not yet been marked with the `:shipit:` emoji of approval.
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001038110
versionName "1.3.81-10"
versionCode 1001038301
versionName "1.3.83-1"
}

flavorDimensions "default"
Expand Down
2 changes: 1 addition & 1 deletion assets/images/new-expensify-adhoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.81</string>
<string>1.3.83</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.81.10</string>
<string>1.3.83.1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.81</string>
<string>1.3.83</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.81.10</string>
<string>1.3.83.1</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "new.expensify",
"version": "1.3.81-10",
"version": "1.3.83-1",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
"license": "MIT",
"private": true,
"scripts": {
"configure-mapbox": "scripts/setup-mapbox-sdk-walkthrough.sh",
"setupNewDotWebForEmulators": "scripts/setup-newdot-web-emulators.sh",
"startAndroidEmulator": "scripts/start-android.sh",
"postinstall": "scripts/postInstall.sh",
"clean": "npx react-native clean-project-auto",
"android": "scripts/set-pusher-suffix.sh && npx react-native run-android --variant=developmentDebug --appId=com.expensify.chat.dev",
Expand Down
133 changes: 133 additions & 0 deletions scripts/select-device.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#!/bin/bash

# Utility script for iOS and Android Emulators
# ============================================
#
# Purpose:
# --------
# This script helps to start and kill iOS simulators and Android emulators instances.
#
# How this script helps:
# ----------------------
# This script streamlines the process of starting and killing on both android and ios
# platforms.

# Use functions and variables from the utils script
source scripts/shellUtils.sh

select_device_ios()
{
# shellcheck disable=SC2124
IFS="$@" arr=$(xcrun xctrace list devices | grep -E "iPhone|iPad")

# Create arrays to store device names and identifiers
device_names=()
device_identifiers=()

# Parse the device list and populate the arrays
while IFS= read -r line; do
if [[ $line =~ ^(.*)\ \((.*)\)\ \((.*)\)$ ]]; then
device="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
identifier="${BASH_REMATCH[3]}"
device_identifiers+=("$identifier")
device_names+=("$device Version: $version")
else
info "Input does not match the expected pattern."
echo "$line"
fi
done <<< "$arr"
if [ ${#device_names[@]} -eq 0 ]; then
error "No devices detected, please create one."
exit 1
fi
if [ ${#device_names[@]} -eq 1 ]; then
device_identifier="${device_identifiers[0]}"
success "Single device detected, launching ${device_names[0]}"
open -a Simulator --args -CurrentDeviceUDID "$device_identifier"
return
fi
info "Multiple devices detected, please select one from the list."
PS3='Please enter your choice: '
select device_name in "${device_names[@]}"; do
if [ -n "$device_name" ]; then
selected_index=$((REPLY - 1))
device_name_for_display="${device_names[$selected_index]}"
device_identifier="${device_identifiers[$selected_index]}"
break
else
echo "Invalid selection. Please choose a device."
fi
done
success "Launching $device_name_for_display"
open -a Simulator --args -CurrentDeviceUDID "$device_identifier"
}

kill_all_emulators_ios() {
# kill all the emulators
killall Simulator
}

restart_adb_server() {
info "Restarting adb ..."
adb kill-server
sleep 2
adb start-server
sleep 2
info "Restarting adb done"
}

ensure_device_available() {
# Must turn off exit on error temporarily
set +e
if adb devices | grep -q offline; then
restart_adb_server
if adb devices | grep -q offline; then
error "Device remains 'offline'. Please investigate!"
exit 1
fi
fi
set -e
}

select_device_android()
{
# shellcheck disable=SC2124
IFS="$@" arr=$(emulator -list-avds)

# Create arrays to store device names
device_names=()

# Parse the device list and populate the arrays
while IFS= read -r line; do
device_names+=("$line")
done <<< "$arr"
if [ ${#device_names[@]} -eq 0 ]; then
error "No devices detected, please create one."
exit 1
fi
if [ ${#device_names[@]} -eq 1 ]; then
device_identifier="${device_names[0]}"
success "Single device detected, launching $device_identifier"
emulator -avd "$device_identifier" -writable-system > /dev/null 2>&1 &
return
fi
info "Multiple devices detected, please select one from the list."
PS3='Please enter your choice: '
select device_name in "${device_names[@]}"; do
if [ -n "$device_name" ]; then
selected_index=$((REPLY - 1))
device_identifier="${device_names[$selected_index]}"
break
else
echo "Invalid selection. Please choose a device."
fi
done
success "Launching $device_identifier"
emulator -avd "$device_identifier" -writable-system > /dev/null 2>&1 &
}

kill_all_emulators_android() {
# kill all the emulators
adb devices | grep emulator | cut -f1 | while read -r line; do adb -s "$line" emu kill; done
}
2 changes: 1 addition & 1 deletion scripts/setup-mapbox-sdk-walkthrough.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# To configure Mapbox, invoke this script by running the following command from the project's root directory:
# npm run configure-mapbox

# Use functions and varaibles from the utils script
# Use functions and variables from the utils script
source scripts/shellUtils.sh

# Intro message
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-mapbox-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# To run this script, pass the secret Mapbox access token as a command-line argument:
# ./scriptname.sh YOUR_MAPBOX_ACCESS_TOKEN

# Use functions and varaibles from the utils script
# Use functions and variables from the utils script
source scripts/shellUtils.sh

NETRC_PATH="$HOME/.netrc"
Expand Down
Loading

0 comments on commit cdcf5af

Please sign in to comment.