-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Expensify:main' into krishna2323/issue/55295
- Loading branch information
Showing
128 changed files
with
2,631 additions
and
1,766 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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
ROOT_DIR=$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")") | ||
cd "$ROOT_DIR" || exit 1 | ||
|
||
autocomplete_parser_backup="src/libs/SearchParser/autocompleteParser.js.bak" | ||
search_parser_backup="src/libs/SearchParser/searchParser.js.bak" | ||
|
||
#Copying the current .js parser files | ||
cp src/libs/SearchParser/autocompleteParser.js "$autocomplete_parser_backup" 2>/dev/null | ||
cp src/libs/SearchParser/searchParser.js "$search_parser_backup" 2>/dev/null | ||
|
||
#Running the scripts that generate the .js parser files | ||
npm run generate-search-parser | ||
npm run generate-autocomplete-parser | ||
|
||
#Checking if the saved files differ from the newly generated | ||
if ! diff -q "$autocomplete_parser_backup" src/libs/SearchParser/autocompleteParser.js >/dev/null || | ||
! diff -q "$search_parser_backup" src/libs/SearchParser/searchParser.js >/dev/null; then | ||
echo "The files generated from the .peggy files using the commands: generate-search-parser and generate-autocomplete-parser are not identical to those currently on this branch." | ||
echo "The parser .js files should never be edited manually. Make sure you’ve run locally: npm run generate-search-parser and npm run generate-autocomplete-parser, and committed the changes." | ||
exit 1 | ||
else | ||
echo "The files generated from the .peggy files using the commands: generate-search-parser and generate-autocomplete-parser are identical to those currently on this branch." | ||
exit 0 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
jobs: | ||
buildHybridAppAndroid: | ||
name: Build HybridApp Android | ||
runs-on: macos-15-xlarge | ||
runs-on: ubuntu-latest-xl | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -30,23 +30,65 @@ jobs: | |
with: | ||
IS_HYBRID_BUILD: 'true' | ||
|
||
- name: Run grunt build | ||
run: | | ||
cd Mobile-Expensify | ||
npm run grunt:build:shared | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'oracle' | ||
java-version: '17' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Install New Expensify Gems | ||
run: bundle install | ||
|
||
- name: Install 1Password CLI | ||
uses: 1password/install-cli-action@v1 | ||
|
||
- name: Load files from 1Password | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
run: | | ||
op document get --output ./upload-key.keystore upload-key.keystore | ||
op document get --output ./android-fastlane-json-key.json android-fastlane-json-key.json | ||
# Copy the keystore to the Android directory for Fullstory | ||
cp ./upload-key.keystore Mobile-Expensify/Android | ||
- name: Load Android upload keystore credentials from 1Password | ||
id: load-credentials | ||
uses: 1password/load-secrets-action@v2 | ||
with: | ||
export-env: false | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
ANDROID_UPLOAD_KEYSTORE_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_PASSWORD | ||
ANDROID_UPLOAD_KEYSTORE_ALIAS: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS | ||
ANDROID_UPLOAD_KEY_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD | ||
|
||
- name: Build Android Release | ||
working-directory: Mobile-Expensify/Android | ||
run: | | ||
if ! ./gradlew --profile assembleRelease | ||
then | ||
echo "❌ Android HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve." | ||
exit 1 | ||
else | ||
echo "✅ Build succeeded. Printing Gradle profile report:" | ||
# Print the latest generated profile report | ||
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f) | ||
cat "$PROFILE_REPORT" | ||
fi | ||
./gradlew --profile assembleRelease \ | ||
-Pandroid.injected.signing.store.file="./upload-key.keystore" \ | ||
-Pandroid.injected.signing.store.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }} \ | ||
-Pandroid.injected.signing.key.alias=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }} \ | ||
-Pandroid.injected.signing.key.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }} | ||
echo "Printing Gradle profile report:" | ||
# Print the latest generated profile report | ||
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f) | ||
cat "$PROFILE_REPORT" | ||
buildStandaloneAndroid: | ||
name: Build Standalone Android | ||
runs-on: macos-15-xlarge | ||
runs-on: ubuntu-latest-xl | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -62,16 +104,19 @@ jobs: | |
with: | ||
IS_HYBRID_BUILD: 'false' | ||
|
||
- name: Decrypt keystore to sign the APK/AAB | ||
run: gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output my-upload-key.keystore my-upload-key.keystore.gpg | ||
working-directory: android/app | ||
|
||
- name: Build Android Release | ||
working-directory: android | ||
env: | ||
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }} | ||
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }} | ||
run: | | ||
if ! ./gradlew --profile assembleProductionRelease | ||
then | ||
echo "❌ Android Standalone failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve." | ||
exit 1 | ||
else | ||
echo "✅ Build succeeded. Printing Gradle profile report:" | ||
# Print the latest generated profile report | ||
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f) | ||
cat "$PROFILE_REPORT" | ||
fi | ||
./gradlew --profile assembleProductionRelease | ||
echo "Printing Gradle profile report:" | ||
# Print the latest generated profile report | ||
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f) | ||
cat "$PROFILE_REPORT" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Check consistency of search parser files | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches-ignore: [staging, production] | ||
paths: | ||
- "src/libs/SearchParser/**" | ||
|
||
jobs: | ||
verify: | ||
if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: ./.github/actions/composite/setupNode | ||
|
||
- name: Verify parser files consistency | ||
run: ./.github/scripts/checkParser.sh |
Submodule Mobile-Expensify
updated
from ee0dee to 42e14b
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.