Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Don't fail an incremental build if can't find a merge base #444

Merged
merged 3 commits into from
Apr 3, 2018
Merged

Don't fail an incremental build if can't find a merge base #444

merged 3 commits into from
Apr 3, 2018

Conversation

fkorotkov
Copy link
Contributor

Added an additional check and a warning message.

This change addresses an issue experienced in #423.

/cc @goderbauer

Added an additional check and warning message
FLUTTER_CHANGED_PACKAGES=`git diff --name-only $BRANCH_BASE_SHA HEAD | grep -o "packages/[^/]*" | sed -e "s/packages\///g" | sort | uniq | paste -s -d, -`

FLUTTER_CHANGED_GLOBAL=0
FLUTTER_CHANGED_GLOBAL=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional to first assign 0 and then empty string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! It's a typo. It suppose to be FLUTTER_CHANGED_PACKAGES. Updated the PR.

FLUTTER_CHANGED_GLOBAL=`git diff --name-only $BRANCH_BASE_SHA HEAD | grep -v packages | wc -l`
FLUTTER_CHANGED_PACKAGES=`git diff --name-only $BRANCH_BASE_SHA HEAD | grep -o "packages/[^/]*" | sed -e "s/packages\///g" | sort | uniq | paste -s -d, -`
else
echo "Cannot find a merge base for the current branch to run an incremental build!"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add to this message what would be required to make the build incremental (e.g. rebase, maybe?)?

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one comment.

@fkorotkov
Copy link
Contributor Author

@goderbauer added an actionable message 🙏

@goderbauer
Copy link
Member

LGTM

Travis failed, I assume its a flake. I restarted it, will merge on green.

@goderbauer goderbauer merged commit 81ef8e4 into flutter:master Apr 3, 2018
slightfoot pushed a commit to slightfoot/plugins that referenced this pull request Jun 5, 2018
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants