Skip to content

Commit

Permalink
Merge branch 'main' into df/19301
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangzinh committed Jun 28, 2023
2 parents 331cc43 + 387ff7f commit 0f106df
Show file tree
Hide file tree
Showing 43 changed files with 580 additions and 481 deletions.
43 changes: 1 addition & 42 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
outputs:
MERGED_PR: ${{ steps.getMergedPullRequest.outputs.number }}
SHOULD_DEPLOY: ${{ steps.shouldDeploy.outputs.SHOULD_DEPLOY }}
SHOULD_CP: ${{ steps.isStagingDeployLocked.outputs.IS_LOCKED && steps.hasCherryPickLabel.outputs.HAS_CP_LABEL }}

steps:
- name: Get merged pull request
Expand All @@ -46,13 +45,9 @@ jobs:
with:
GITHUB_TOKEN: ${{ github.token }}

- name: Check if merged pull request has `CP Staging` label
id: hasCherryPickLabel
run: echo "HAS_CP_LABEL=${{ contains(steps.getMergedPullRequest.outputs.labels, 'CP Staging') }}" >> "$GITHUB_OUTPUT"

- name: Check if merged pull request should trigger a deploy
id: shouldDeploy
run: echo "SHOULD_DEPLOY=${{ fromJSON(steps.hasCherryPickLabel.outputs.HAS_CP_LABEL) || (!fromJSON(steps.isStagingDeployLocked.outputs.IS_LOCKED) && github.actor != 'OSBotify') }}" >> "$GITHUB_OUTPUT"
run: echo "SHOULD_DEPLOY=${{ (!fromJSON(steps.isStagingDeployLocked.outputs.IS_LOCKED) && github.actor != 'OSBotify') }}" >> "$GITHUB_OUTPUT"

skipDeploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -94,22 +89,13 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Update staging branch from main
if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }}
run: |
# Re-create the staging branch from main
git switch -c staging
# Force-update the remote staging branch
git push --force origin staging
- name: Cherry-pick PR to staging
if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }}
uses: Expensify/App/.github/actions/javascript/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: cherryPick.yml
INPUTS: '{ "PULL_REQUEST_NUMBER": "${{ needs.chooseDeployActions.outputs.MERGED_PR }}", "NEW_VERSION": "${{ needs.createNewVersion.outputs.NEW_VERSION }}" }'

# Create a local git tag on staging so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a
# list of pull requests that were merged between this version tag and another.
# NOTE: This tag is only used locally and shouldn't be pushed to the remote.
Expand All @@ -129,33 +115,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Comment in StagingDeployCash to alert Applause that a new pull request has been cherry-picked
if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }}
run: |
PR_URL="https://github.com/Expensify/App/pull/${{ needs.chooseDeployActions.outputs.MERGED_PR }}"
printf -v COMMENT ":clap: Heads up @Expensify/applauseleads :clap:\nA [new pull request](%s) has been :cherries: cherry-picked :cherries: to staging, and will be deployed to staging in version \`%s\` :rocket:" "$PR_URL" ${{ needs.createNewVersion.outputs.NEW_VERSION }}
gh issue comment \
${{ steps.getStagingDeployCash.outputs.STAGING_DEPLOY_CASH }} \
--body "$COMMENT"
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Wait for staging deploys to finish
if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }}
uses: Expensify/App/.github/actions/javascript/awaitStagingDeploys@main
with:
GITHUB_TOKEN: ${{ github.token }}
TAG: ${{ needs.createNewVersion.outputs.NEW_VERSION }}

- name: Comment in StagingDeployCash to alert Applause that cherry-picked pull request has been deployed.
if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }}
run: |
gh issue comment \
${{ steps.getStagingDeployCash.outputs.STAGING_DEPLOY_CASH }} \
--body ":tada: All set?…You bet! @Expensify/applauseleads https://github.com/Expensify/App/releases/tag/${{ needs.createNewVersion.outputs.NEW_VERSION }} has been deployed to staging :tada:"
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/warnCPLabel.yml

This file was deleted.

4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001033303
versionName "1.3.33-3"
versionCode 1001033401
versionName "1.3.34-1"
}

splits {
Expand Down
139 changes: 76 additions & 63 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,79 +1,92 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.expensify.chat">
xmlns:tools="http://schemas.android.com/tools"
package="com.expensify.chat">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!-- android:hardwareAccelerated is essential for Android performance: https://developer.android.com/topic/performance/hardware-accel -->
<application
android:supportsRtl="false"
android:hardwareAccelerated="true"
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:resizeableActivity="false"
android:theme="@style/AppTheme"
tools:replace="android:supportsRtl">

<activity
android:name=".MainActivity"
android:name=".MainApplication"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:exported="true"
android:windowSoftInputMode="adjustResize"
android:theme="@style/BootTheme">
android:resizeableActivity="false"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:theme="@style/AppTheme"
tools:replace="android:supportsRtl">

<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/BootTheme"
android:windowSoftInputMode="adjustResize">

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<!-- Custom URI handlers. Used to intercept Urban Airship deep links. -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="new-expensify" />
</intent-filter>

<!-- Web URL handlers. Used to intercept web links. -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Production URLs -->
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/r"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/settings"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/details"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/v"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/bank-account"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/iou"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/enable-payments"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/statements"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/concierge"/>

<!-- Custom URI handlers. Used to intercept Urban Airship deep links. -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="new-expensify"/>
</intent-filter>
<!-- Staging URLs -->
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/r"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/settings"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/details"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/v"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/bank-account"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/iou"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/enable-payments"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/statements"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/concierge"/>
</intent-filter>
</activity>

<!-- Web URL handlers. Used to intercept web links. -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<meta-data
android:name="com.urbanairship.reactnative.AIRSHIP_EXTENDER"
android:value="com.expensify.chat.customairshipextender.CustomAirshipExtender" />

<!-- Production URLs -->
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/r"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/settings"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/details"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/v"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/bank-account"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/iou"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/enable-payments"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/statements"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/concierge"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_launcher" />

<!-- Staging URLs -->
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/r"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/settings"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/details"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/v"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/bank-account"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/iou"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/enable-payments"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/statements"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/concierge"/>
</intent-filter>
</activity>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/bootsplash_background" />

<meta-data android:name="com.urbanairship.reactnative.AIRSHIP_EXTENDER"
android:value="com.expensify.chat.customairshipextender.CustomAirshipExtender" />
</application>
</manifest>
Loading

0 comments on commit 0f106df

Please sign in to comment.