Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Fix NewDot deploys #9771

Merged
merged 5 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/actions/composite/updateProtectedBranch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ runs:

- name: Checkout source branch
shell: bash
run: git checkout ${{ env.SOURCE_BRANCH }}
run: |
git fetch
git checkout ${{ env.SOURCE_BRANCH }}

- name: Set New Version
shell: bash
Expand All @@ -66,7 +68,10 @@ runs:
git checkout ${{ inputs.TARGET_BRANCH }}
BRANCH_NAME=update-${{ inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}
git checkout -b "$BRANCH_NAME"
git merge -Xtheirs ${{ env.SOURCE_BRANCH }}
git merge -Xtheirs ${{ env.SOURCE_BRANCH }} || {
git diff --name-only --diff-filter=U | xargs git rm;
git merge --continue;
}
git push --set-upstream origin "$BRANCH_NAME"

- name: Create Pull Request
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/getPullRequestsMergedBetweenTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ success "Version bumped to $(print_version) on main"
info "Merging main into staging..."
git checkout staging
git checkout -b update-staging-from-main
git merge --no-edit -Xtheirs main
git merge --no-edit -Xtheirs main || { git diff --name-only --diff-filter=U | xargs git rm; git merge --continue; }
git checkout staging
git merge update-staging-from-main --no-ff -m "Merge pull request #3 from Expensify/update-staging-from-main"
info "Merged PR #3 to staging"
Expand Down Expand Up @@ -219,7 +219,7 @@ title "Scenario #4A: Run the production deploy"
info "Updating production from staging..."
git checkout production
git checkout -b update-production-from-staging
git merge --no-edit -Xtheirs staging
git merge --no-edit -Xtheirs staging || { git diff --name-only --diff-filter=U | xargs git rm; git merge --continue; }
git checkout production
git merge update-production-from-staging --no-ff -m "Merge pull request #8 from Expensify/update-production-from-staging"
info "Merged PR #8 into production"
Expand Down Expand Up @@ -250,7 +250,7 @@ success "Successfully updated version to 1.1.0 on main!"
info "Updating staging from main..."
git checkout staging
git checkout -b update-staging-from-main
git merge --no-edit -Xtheirs main
git merge --no-edit -Xtheirs main || { git diff --name-only --diff-filter=U | xargs git rm; git merge --continue; }
git checkout staging
git merge update-staging-from-main --no-ff -m "Merge pull request #10 from Expensify/update-staging-from-main"
info "Merged PR #10 into staging"
Expand Down Expand Up @@ -299,7 +299,7 @@ success "Bumped version to 1.1.1 on main!"
info "Merging main into staging..."
git checkout staging
git checkout -b update-staging-from-main
git merge --no-edit -Xtheirs main
git merge --no-edit -Xtheirs main || { git diff --name-only --diff-filter=U | xargs git rm; git merge --continue; }
git checkout staging
git merge update-staging-from-main --no-ff -m "Merge pull request #13 from Expensify/update-staging-from-main"
info "Merged PR #13 into staging"
Expand Down