Skip to content

Commit

Permalink
Merge branch 'main' into 289Adam289/47254-search-results-page-header-…
Browse files Browse the repository at this point in the history
…cleanup
  • Loading branch information
289Adam289 committed Sep 11, 2024
2 parents 8fc3c4e + 3e3388d commit 3dbc34d
Show file tree
Hide file tree
Showing 148 changed files with 4,715 additions and 4,957 deletions.
6 changes: 5 additions & 1 deletion .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ outputs:
runs:
using: composite
steps:
- name: Remove E/App version from package-lock.json
shell: bash
run: jq 'del(.version, .packages[""].version)' package-lock.json > normalized-package-lock.json

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
cache-dependency-path: |
package-lock.json
normalized-package-lock.json
desktop/package-lock.json
- id: cache-node-modules
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/createHelpRedirects.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Adds new routes to the Cloudflare Bulk Redirects list for communityDot to helpDot
# pages. Does some basic sanity checking.
# pages. Sanity checking is done upstream in the PRs themselves in verifyRedirect.sh.

set -e

Expand Down
28 changes: 16 additions & 12 deletions .github/scripts/verifyRedirect.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
#!/bin/bash

# HelpDot - Verifies that redirects.csv does not have any duplicates
# Duplicate sourceURLs break redirection on cloudflare pages
# HelpDot - Verifies that redirects.csv does not have any errors that would prevent
# the bulk redirects in Cloudflare from working. This includes:
# Duplicate sourceURLs
# Source URLs containing anchors or URL params
# URLs pointing to themselves
#
# We also prevent adding source or destination URLs outside of an allowed list
# of domains. That's because these redirects run on our zone as a whole, so you
# could add a redirect for sites outside of help/community and Cloudflare would allow it
# and it would work.

source scripts/shellUtils.sh

declare -r REDIRECTS_FILE="docs/redirects.csv"
declare -a ITEMS_TO_ADD

declare -r RED='\033[0;31m'
declare -r GREEN='\033[0;32m'
declare -r NC='\033[0m'

duplicates=$(awk -F, 'a[$1]++{print $1}' $REDIRECTS_FILE)
if [[ -n "$duplicates" ]]; then
echo "${RED}duplicate redirects are not allowed: $duplicates ${NC}"
echo "${RED}duplicate redirects are not allowed: $duplicates ${RESET}"
exit 1
fi

npm run detectRedirectCycle
DETECT_CYCLE_EXIT_CODE=$?
if [[ DETECT_CYCLE_EXIT_CODE -eq 1 ]]; then
echo -e "${RED}The redirects.csv has a cycle. Please remove the redirect cycle because it will cause an infinite redirect loop ${NC}"
echo -e "${RED}The redirects.csv has a cycle. Please remove the redirect cycle because it will cause an infinite redirect loop ${RESET}"
exit 1
fi

Expand All @@ -46,8 +50,8 @@ while read -r line; do

# Basic sanity checking to make sure that the source and destination are in expected
# subdomains.
if ! [[ $SOURCE_URL =~ ^https://(community|help)\.expensify\.com ]] || [[ $SOURCE_URL =~ \# ]]; then
error "Found source URL that is not a communityDot or helpDot URL, or contains a '#': $SOURCE_URL"
if ! [[ $SOURCE_URL =~ ^https://(community|help)\.expensify\.com ]] || [[ $SOURCE_URL =~ (\#|\?) ]]; then
error "Found source URL that is not a communityDot or helpDot URL, or contains a '#' or '?': $SOURCE_URL"
exit 1
fi

Expand All @@ -66,9 +70,9 @@ done <<< "$(tail +2 $REDIRECTS_FILE)"
# Sanity check that we should actually be running this and we aren't about to delete
# every single redirect.
if [[ "${#ITEMS_TO_ADD[@]}" -lt 1 ]]; then
error "No items found to add, why are we running?"
error "${RED}No items found to add, why are we running?${RESET}"
exit 1
fi

echo -e "${GREEN}The redirects.csv is valid!${NC}"
echo -e "${GREEN}The redirects.csv is valid!${RESET}"
exit 0
17 changes: 7 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,8 @@ jobs:
needs: prep
if: ${{ github.ref == 'refs/heads/staging' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: 'Deploy HybridApp'
run: gh workflow run --repo Expensify/Mobile-Deploy deploy.yml -f force_build=true -f build_version="$(npm run print-version --silent)"
run: gh workflow run --repo Expensify/Mobile-Deploy deploy.yml -f force_build=true -f build_version="${{ needs.prep.outputs.APP_VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

Expand Down Expand Up @@ -496,10 +493,10 @@ jobs:

- name: 🚀 Create prerelease 🚀
run: |
gh release create ${{ needs.prep.outputs.APP_VERSION }} --title ${{ needs.prep.outputs.APP_VERSION }} --generate-notes --prerelease --target staging
gh release create ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --title ${{ needs.prep.outputs.APP_VERSION }} --generate-notes --prerelease --target staging
RETRIES=0
MAX_RETRIES=10
until [[ $(gh release view ${{ needs.prep.outputs.APP_VERSION }}) || $RETRIES -ge $MAX_RETRIES ]]; do
until [[ $(gh release view ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }}) || $RETRIES -ge $MAX_RETRIES ]]; do
echo "release not found, retrying $((MAX_RETRIES - RETRIES++)) times"
sleep 1
done
Expand All @@ -513,7 +510,7 @@ jobs:
- name: Upload artifacts to GitHub Release
run: |
gh release upload ${{ needs.prep.outputs.APP_VERSION }} \
gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} \
./android-sourcemaps-artifact/index.android.bundle.map#android-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \
./android-build-artifact/app-production-release.aab \
./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \
Expand Down Expand Up @@ -559,7 +556,7 @@ jobs:
- name: Upload artifacts to GitHub Release
run: |
gh release upload ${{ needs.prep.outputs.APP_VERSION }} \
gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} \
./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \
./desktop-build-artifact/NewExpensify.dmg \
./web-sourcemaps-artifact/web-merged-source-map.js.map#web-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \
Expand All @@ -570,9 +567,9 @@ jobs:

- name: 🚀 Edit the release to be no longer a prerelease 🚀
run: |
LATEST_RELEASE="$(gh release list --exclude-pre-releases --json tagName,isLatest --jq '.[] | select(.isLatest) | .tagName')"
LATEST_RELEASE="$(gh release list --repo ${{ github.repository }} --exclude-pre-releases --json tagName,isLatest --jq '.[] | select(.isLatest) | .tagName')"
gh api --method POST /repos/Expensify/App/releases/generate-notes -f "tag_name=${{ needs.prep.outputs.APP_VERSION }}" -f "previous_tag_name=$LATEST_RELEASE" | jq -r '.body' >> releaseNotes.md
gh release edit ${{ needs.prep.outputs.APP_VERSION }} --prerelease=false --latest --notes-file releaseNotes.md
gh release edit ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --prerelease=false --latest --notes-file releaseNotes.md
env:
GITHUB_TOKEN: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:
Test spec output.txt
log_artifacts: debug.log
cleanup: true
timeout: 5400
timeout: 7200

- name: Print logs if run failed
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009003112
versionName "9.0.31-12"
versionCode 1009003202
versionName "9.0.32-2"
// 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
39 changes: 39 additions & 0 deletions assets/images/companyCards/card-amex-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/images/user-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
14 changes: 6 additions & 8 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -542,19 +542,18 @@ https://community.expensify.com/discussion/8118/how-to-redeem-deel-com-perk,http
https://community.expensify.com/discussion/8256/how-to-redeem-25-off-slack-with-the-expensify-card,https://help.expensify.com/articles/expensify-classic/expensify-card/Expensify-Card-Perks#slack
https://community.expensify.com/discussion/8737/exclusive-perks-for-expensify-card-members,https://help.expensify.com/articles/expensify-classic/expensify-card/Expensify-Card-Perks
https://community.expensify.com/discussion/9040/how-to-redeem-10-off-netsuite-with-the-expensify-card,https://help.expensify.com/articles/expensify-classic/expensify-card/Expensify-Card-Perks#netsuite
https://community.expensify.com/discussion/4828/how-to-match-your-company-cards-statement-to-expensify/p1?new=1,https://help.expensify.com/articles/expensify-classic/connect-credit-cards/company-cards/Reconciliation
https://community.expensify.com/discussion/4828/how-to-match-your-company-cards-statement-to-expensify,https://help.expensify.com/articles/expensify-classic/connect-credit-cards/company-cards/Reconciliation
https://community.expensify.com/discussion/5580/deep-dive-configure-advanced-settings-for-netsuite/,https://help.expensify.com/articles/expensify-classic/connections/netsuite/Configure-Netsuite#step-3-configure-advanced-settings
https://community.expensify.com/discussion/7231/how-to-export-invoices-to-netsuite/p1?new=1,https://help.expensify.com/articles/expensify-classic/connections/netsuite/Configure-Netsuite#export-invoices
https://community.expensify.com/discussion/7231/how-to-export-invoices-to-netsuite/,https://help.expensify.com/articles/expensify-classic/connections/netsuite/Configure-Netsuite#export-invoices
https://community.expensify.com/discussion/9168/how-to-troubleshoot-general-errors-when-uploading-your-id-via-onfido,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Resolve-Errors-Adding-a-Bank-Account
https://community.expensify.com/discussion/4707/how-to-set-up-your-mobile-app,https://use.expensify.com/expensify-mobile-app
https://community.expensify.com/discussion/4707/how-to-set-up-your-mobile-app/,https://use.expensify.com/expensify-mobile-app
https://community.expensify.com/discussion/7066/introducing-concierge-travel,https://help.expensify.com/expensify-classic/hubs/travel/
https://help.expensify.com/expensify-classic/hubs/integrations/,https://help.expensify.com/expensify-classic/hubs/connections/
https://help.expensify.com/articles/expensify-classic/policy-and-domain-settings/reports/Scheduled-Submit,https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports
https://help.expensify.com/articles/expensify-classic/expensify-card/Set-Up-the-Card-for-Your-Company,https://help.expensify.com/articles/expensify-classic/expensify-card/Set-Up-the-Expensify-Visa%C2%AE-Commercial-Card-for-your-Company
https://community.expensify.com/discussion/5542/deep-dive-what-are-ereceipts,https://help.expensify.com/articles/expensify-classic/workspaces/Expense-Settings#ereceipts
https://community.expensify.com/discussion/5738/deep-dive-how-does-concierge-receipt-audit-work,https://help.expensify.com/articles/expensify-classic/workspaces/Expense-Settings#concierge-receipt-audit
https://community.expensify.com/discussion/4643/how-to-invite-people-to-your-policy-using-a-join-link,https://help.expensify.com/articles/expensify-classic/workspaces/Invite-members-and-assign-roles#invite-with-a-link
https://community.expensify.com/discussion/4975/how-to-invite-users-to-your-policy-manually-or-in-bulk/p1?new=1,https://help.expensify.com/articles/expensify-classic/workspaces/Invite-members-and-assign-roles
https://help.expensify.com/articles/expensify-classic/workspaces/Invoicing,https://help.expensify.com/articles/expensify-classic/workspaces/Set-Up-Invoicing
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements.md,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Trip-Actions,https://help.expensify.com/expensify-classic/hubs/connections/
Expand All @@ -565,8 +564,7 @@ https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments
https://help.expensify.com/articles/expensify-classic/connect-credit-cards/Global-Reimbursements,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements
https://community.expensify.com/discussion/4641/how-to-add-a-deposit-only-bank-account-both-personal-and-business,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Connect-US-Business-Bank-Account
https://community.expensify.com/discussion/5940/how-to-get-reimbursed-outside-the-us-with-wise-for-non-us-employees,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/Third-Party-Payments
https://community.expensify.com/home/leaving?allowTrusted=1&target=https%3A%2F%2Fqbo.intuit.com%2Fapp%2Fvendors,https://help.expensify.com/articles/expensify-classic/connections/quickbooks-online/Quickbooks-Online-Troubleshooting
https://community.expensify.com/discussion/5654/deep-dive-using-expense-rules-to-vendor-match-when-exporting-to-an-accounting-package/p1?new=1,https://help.expensify.com/articles/expensify-classic/connections/xero/Xero-Troubleshooting
https://help.expensify.com/articles/expensify-classic/spending-insights/(https://help.expensify.com/articles/expensify-classic/spending-insights/Custom-Templates),https://help.expensify.com/articles/expensify-classic/spending-insights/Custom-Templates
https://help.expensify.com/articles/expensify-classic/spending-insights,https://help.expensify.com/articles/expensify-classic/spending-insights/Custom-Templates
https://help.expensify.com/articles/expensify-classic/settings/account-settings/Set-notifications,https://help.expensify.com/articles/expensify-classic/settings/account-settings/Set-Notifications
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Reimburse-Reports-Invoices-and-Bills,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Reimburse-Reports
https://help.expensify.com/articles/new-expensify/getting-started/Upgrade-to-a-Collect-Plan,https://help.expensify.com/Hidden/Upgrade-to-a-Collect-Plan
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Reimburse-Reports-Invoices-and-Bills,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Reimburse-Reports
25 changes: 21 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ skip_docs
opt_out_usage

KEY_GRADLE_APK_PATH = "gradleAPKOutputPath"
KEY_GRADLE_AAB_PATH = "gradleAABOutputPath"
KEY_IPA_PATH = "ipaPath"
KEY_DSYM_PATH = "dsymPath"

Expand Down Expand Up @@ -44,9 +45,13 @@ end

def setGradleOutputsInEnv()
puts "Saving Android build outputs in env..."
exportEnvVars({
env_vars = {
KEY_GRADLE_APK_PATH => lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
})
}
if lane_context.key?(SharedValues::GRADLE_AAB_OUTPUT_PATH)
env_vars[KEY_GRADLE_AAB_PATH] = lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]
end
exportEnvVars(env_vars)
end

def setIOSBuildOutputsInEnv()
Expand All @@ -58,8 +63,20 @@ def setIOSBuildOutputsInEnv()
end

platform :android do
desc "Generate a new local APK"
desc "Generate a production AAB"
lane :build do
ENV["ENVFILE"]=".env.production"
gradle(
project_dir: './android',
task: 'bundle',
flavor: 'Production',
build_type: 'Release',
)
setGradleOutputsInEnv()
end

desc "Generate a new local APK"
lane :build_local do
ENV["ENVFILE"]=".env.production"
gradle(
project_dir: './android',
Expand Down Expand Up @@ -132,7 +149,7 @@ platform :android do
upload_to_play_store(
package_name: "com.expensify.chat",
json_key: './android/app/android-fastlane-json-key.json',
aab: './android/app/build/outputs/bundle/productionRelease/app-production-release.aab',
aab: ENV[KEY_GRADLE_AAB_PATH],
track: 'internal',
rollout: '1.0'
)
Expand Down
Loading

0 comments on commit 3dbc34d

Please sign in to comment.