Skip to content

Commit

Permalink
Merge branch 'main' into fix/26317-pdf-fit
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Sep 11, 2023
2 parents 09d7065 + ae68e74 commit f72dca0
Show file tree
Hide file tree
Showing 114 changed files with 949 additions and 370 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,7 @@ function fetchTag(tag) {
console.log(`Running command: ${command}`);
execSync(command);
} catch (e) {
// This can happen if the tag was only created locally but does not exist in the remote. In this case, we'll fetch history of the staging branch instead
const command = `git fetch origin staging --no-tags --shallow-exclude=${previousPatchVersion}`;
console.log(`Running command: ${command}`);
execSync(command);
console.error(e);
}
}

Expand Down Expand Up @@ -301,13 +298,14 @@ function getValidMergedPRs(commits) {
* @returns {Promise<Array<Number>>} – Pull request numbers
*/
function getPullRequestsMergedBetween(fromTag, toTag) {
console.log(`Looking for commits made between ${fromTag} and ${toTag}...`);
return getCommitHistoryAsJSON(fromTag, toTag).then((commitList) => {
console.log(`Commits made between ${fromTag} and ${toTag}:`, commitList);

// Find which commit messages correspond to merged PR's
const pullRequestNumbers = getValidMergedPRs(commitList);
console.log(`List of pull requests merged between ${fromTag} and ${toTag}`, pullRequestNumbers);
return pullRequestNumbers;
return _.map(pullRequestNumbers, (prNum) => Number.parseInt(prNum, 10));
});
}

Expand Down
8 changes: 3 additions & 5 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ function fetchTag(tag) {
console.log(`Running command: ${command}`);
execSync(command);
} catch (e) {
// This can happen if the tag was only created locally but does not exist in the remote. In this case, we'll fetch history of the staging branch instead
const command = `git fetch origin staging --no-tags --shallow-exclude=${previousPatchVersion}`;
console.log(`Running command: ${command}`);
execSync(command);
console.error(e);
}
}

Expand Down Expand Up @@ -264,13 +261,14 @@ function getValidMergedPRs(commits) {
* @returns {Promise<Array<Number>>} – Pull request numbers
*/
function getPullRequestsMergedBetween(fromTag, toTag) {
console.log(`Looking for commits made between ${fromTag} and ${toTag}...`);
return getCommitHistoryAsJSON(fromTag, toTag).then((commitList) => {
console.log(`Commits made between ${fromTag} and ${toTag}:`, commitList);

// Find which commit messages correspond to merged PR's
const pullRequestNumbers = getValidMergedPRs(commitList);
console.log(`List of pull requests merged between ${fromTag} and ${toTag}`, pullRequestNumbers);
return pullRequestNumbers;
return _.map(pullRequestNumbers, (prNum) => Number.parseInt(prNum, 10));
});
}

Expand Down
8 changes: 3 additions & 5 deletions .github/libs/GitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ function fetchTag(tag) {
console.log(`Running command: ${command}`);
execSync(command);
} catch (e) {
// This can happen if the tag was only created locally but does not exist in the remote. In this case, we'll fetch history of the staging branch instead
const command = `git fetch origin staging --no-tags --shallow-exclude=${previousPatchVersion}`;
console.log(`Running command: ${command}`);
execSync(command);
console.error(e);
}
}

Expand Down Expand Up @@ -116,13 +113,14 @@ function getValidMergedPRs(commits) {
* @returns {Promise<Array<Number>>} – Pull request numbers
*/
function getPullRequestsMergedBetween(fromTag, toTag) {
console.log(`Looking for commits made between ${fromTag} and ${toTag}...`);
return getCommitHistoryAsJSON(fromTag, toTag).then((commitList) => {
console.log(`Commits made between ${fromTag} and ${toTag}:`, commitList);

// Find which commit messages correspond to merged PR's
const pullRequestNumbers = getValidMergedPRs(commitList);
console.log(`List of pull requests merged between ${fromTag} and ${toTag}`, pullRequestNumbers);
return pullRequestNumbers;
return _.map(pullRequestNumbers, (prNum) => Number.parseInt(prNum, 10));
});
}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The GitHub workflows require a large list of secrets to deploy, notify and test
1. `LARGE_SECRET_PASSPHRASE` - decrypts secrets stored in various encrypted files stored in GitHub repository. To create updated versions of these encrypted files, refer to steps 1-4 of [this encrypted secrets help page](https://docs.github.com/en/actions/reference/encrypted-secrets#limits-for-secrets) using the `LARGE_SECRET_PASSPHRASE`.
1. `android/app/my-upload-key.keystore.gpg`
1. `android/app/android-fastlane-json-key.json.gpg`
1. `ios/chat_expensify_adhoc.mobileprovision.gpg`
1. `ios/expensify_chat_adhoc.mobileprovision.gpg`
1. `ios/chat_expensify_appstore.mobileprovision.gpg`
1. `ios/Certificates.p12.gpg`
1. `SLACK_WEBHOOK` - Sends Slack notifications via Slack WebHook https://expensify.slack.com/services/B01AX48D7MM
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,3 @@ jobs:
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

# Create a new StagingDeployCash for the next release cycle.
createNewStagingDeployCash:
runs-on: ubuntu-latest
needs: [updateStaging, createNewPatchVersion]
steps:
- uses: actions/checkout@v3
with:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}

# Create a local git tag 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.
# If it was pushed, that would trigger the staging deploy which is handled in a separate workflow (deploy.yml)
- name: Tag version
run: git tag ${{ needs.createNewPatchVersion.outputs.NEW_VERSION }}

- name: Create new StagingDeployCash
uses: Expensify/App/.github/actions/javascript/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ needs.createNewPatchVersion.outputs.NEW_VERSION }}

- if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Lint JavaScript with ESLint
- name: Lint JavaScript and Typescript with ESLint
run: npm run lint
env:
CI: true
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

# Note: we're updating the checklist before running the deploys and assuming that it will succeed on at least one platform
deployChecklist:
name: Create or update deploy checklist
runs-on: ubuntu-latest
needs: validateActor
steps:
- uses: actions/checkout@v3
- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Set version
id: getVersion
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"

- name: Create or update staging deploy
uses: Expensify/App/.github/actions/javascript/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ steps.getVersion.outputs.VERSION }}

android:
name: Build and deploy Android
needs: validateActor
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,6 @@ jobs:
# Force-update the remote staging branch
git push --force origin staging
# 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.
# If it was pushed, that would trigger the staging deploy which is handled in a separate workflow (deploy.yml)
- name: Tag staging
run: git tag ${{ needs.createNewVersion.outputs.NEW_VERSION }}

- name: Update StagingDeployCash
uses: Expensify/App/.github/actions/javascript/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ needs.createNewVersion.outputs.NEW_VERSION }}

- name: Find open StagingDeployCash
id: getStagingDeployCash
run: echo "STAGING_DEPLOY_CASH=$(gh issue list --label StagingDeployCash --json number --jq '.[0].number')" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- if: ${{ failure() }}
uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main
with:
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 1001036502
versionName "1.3.65-2"
versionCode 1001036702
versionName "1.3.67-2"
}

flavorDimensions "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ developmentLogLevel = VERBOSE

# Notification Customization
notificationIcon = ic_notification
notificationAccentColor = #2EAAE2
notificationAccentColor = #03D47C
2 changes: 1 addition & 1 deletion android/app/src/main/assets/airshipconfig.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ inProduction = true

# Notification Customization
notificationIcon = ic_notification
notificationAccentColor = #2EAAE2
notificationAccentColor = #03D47C
Binary file modified android/app/src/main/res/drawable-hdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxxhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/values-large/orientation.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="portrait_only">false</bool>
<bool name="portrait_only">true</bool>
</resources>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values-sw600dp/orientation.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="portrait_only">false</bool>
<bool name="portrait_only">true</bool>
</resources>
1 change: 1 addition & 0 deletions contributingGuides/FORMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ Form.js will automatically provide the following props to any input with the inp
- onBlur: An onBlur handler that calls validate.
- onTouched: An onTouched handler that marks the input as touched.
- onInputChange: An onChange handler that saves draft values and calls validate for that input (inputA). Passing an inputID as a second param allows inputA to manipulate the input value of the provided inputID (inputB).
- onFocus: An onFocus handler that marks the input as focused.

## Dynamic Form Inputs

Expand Down
10 changes: 5 additions & 5 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ platform :ios do
contact_phone: ENV["APPLE_CONTACT_PHONE"],
demo_account_name: ENV["APPLE_DEMO_EMAIL"],
demo_account_password: ENV["APPLE_DEMO_PASSWORD"],
notes: "1. Log into the Expensify app using the provided email
2. Now, you have to log in to this gmail account on https://mail.google.com/ so you can retrieve a One-Time-Password
3. To log in to the gmail account, use the password above (That's NOT a password for the Expensify app but for the Gmail account)
4. At the Gmail inbox, you should have received a one-time 6 digit magic code
5. Use that to sign in"
notes: "1. In the Expensify app, enter the email 'appletest.expensify@proton.me'. This will trigger a sign-in link to be sent to 'appletest.expensify@proton.me'
2. Navigate to https://account.proton.me/login, log into Proton Mail using 'appletest.expensify@proton.me' as email and the password associated with 'appletest.expensify@proton.me', provided above
3. Once logged into Proton Mail, navigate to your inbox and locate the email triggered in step 1. The email subject should be 'Your magic sign-in link for Expensify'
4. Open the email and copy the 6-digit sign-in code provided within
5. Return to the Expensify app and enter the copied 6-digit code in the designated login field"
}
)
rescue Exception => e
Expand Down
8 changes: 4 additions & 4 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.65</string>
<string>1.3.67</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.65.2</string>
<string>1.3.67.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down Expand Up @@ -108,6 +108,8 @@
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand All @@ -117,8 +119,6 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Dark</string>
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.65</string>
<string>1.3.67</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.65.2</string>
<string>1.3.67.2</string>
</dict>
</plist>
Binary file removed ios/chat_expensify_adhoc.mobileprovision.gpg
Binary file not shown.
Binary file modified ios/expensify_chat_adhoc.mobileprovision.gpg
Binary file not shown.
Binary file removed ios/expensify_chat_dev.mobileprovision.gpg
Binary file not shown.
32 changes: 16 additions & 16 deletions package-lock.json

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

Loading

0 comments on commit f72dca0

Please sign in to comment.