Skip to content

Commit

Permalink
ci: Work around broken ref for Flutter upstream main
Browse files Browse the repository at this point in the history
Fixes #1177.

Workaround for:
  flutter/flutter#160558
gnprice authored and chrisbobbe committed Dec 19, 2024
1 parent 59c6ef6 commit d90c5a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -27,6 +27,11 @@ jobs:
TZ=UTC git --git-dir ~/flutter/.git log -1 --format='%h | %ci | %s' --date=iso8601-local
echo ~/flutter/bin >> "$GITHUB_PATH"
# The Flutter tool assumes the tip of tree is "upstream/master":
# https://github.com/flutter/flutter/issues/160558
# TODO(upstream): make workaround unneeded
git --git-dir ~/flutter/.git update-ref refs/remotes/upstream/master origin/main
- name: Download Flutter SDK artifacts (flutter precache)
run: flutter precache --universal

3 comments on commit d90c5a0

@jtmcdole
Copy link

Choose a reason for hiding this comment

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

This should be fixed at head.

@gnprice
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the note!

After flutter/flutter#160574 there's still a remaining issue, though: that PR fixed the "upstream" vs. "origin" thing, but the script still assumes there's a ref called "master". We clone the branch "main", which in the Flutter repo always points to the same commit as "master".

An updated version of this workaround (which I sent just now) is #1186.

@gnprice
Copy link
Member Author

Choose a reason for hiding this comment

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

And now I've filed a proper issue for that: flutter/flutter#160626

Please sign in to comment.