mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Fix bundle size diff message (#16576)
The bundle size diff message is using the wrong point of comparision, leading to misleading results on feature branches that have been merged with `develop` since they were created. When this feature was introduced, we went back and forth a few times on what we should be comparing the branch with to get an accurate bundle size comparison. The first attempt used `develop` as the point of comparison, but that didn't work because it was a moving target, and because it didn't reflect the changes made on this branch. As bundle increases or decreases were added on `develop`, they would alter the diff on each feature PR. Then we chose to use the fork-point of the branch, the commit of `develop` that the branch forked off of. This works for feature branches that don't merge in `develop`. But the minute `develop` gets merged in, then unrelated changes on `develop` affect the measurement. The _most recent_ commit from `develop` on the current branch is a better comparison. Any difference between this commit and the feature branch in terms of bundle size would be attributable to the feature branch changes. This is what `merge-base` gives us.
This commit is contained in:
parent
67bfd446fc
commit
65f2f17695
@ -803,7 +803,7 @@ jobs:
|
||||
- run:
|
||||
name: Set branch parent commit env var
|
||||
command: |
|
||||
echo "export PARENT_COMMIT=$(git rev-parse "$(git rev-list --topo-order --reverse HEAD ^origin/develop | head -1)"^)" >> $BASH_ENV
|
||||
echo "export PARENT_COMMIT=$(git merge-base origin/HEAD HEAD)" >> $BASH_ENV
|
||||
source $BASH_ENV
|
||||
- run:
|
||||
name: build:announce
|
||||
|
Loading…
Reference in New Issue
Block a user