Skip to content

Commit 81e0f36

Browse files
rajveermalviyagnprice
authored andcommitted
ci: Prefer --filter=blob:none over --depth=N
Flutter upstream changed it's version number calculation and it now doesn't play well with "shallow clone". CZO discussion: https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/CI.20failing.20after.20Flutter.20upgrade/with/2258300
1 parent 1a56408 commit 81e0f36

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,10 @@ jobs:
1818
distribution: temurin
1919

2020
- name: Clone Flutter SDK
21-
# We can't do a depth-1 clone, because we need the most recent tag
22-
# so that Flutter knows its version and sees the constraint in our
23-
# pubspec is satisfied. It's uncommon for flutter/flutter to go
24-
# more than 100 commits between tags. Fetch 1000 for good measure.
25-
# TODO(upstream): Around 2025-05, Flutter upstream stopped making
26-
# tags within the main/master branch. Get that fixed:
27-
# https://github.com/zulip/zulip-flutter/issues/1710
28-
# Pending that, fetch more than 1000 commits.
21+
# Upstream's version calculation fails with a shallow clone,
22+
# so instead clone with `--filter=blob:none`.
2923
run: |
30-
git clone --depth=3000 -b main https://github.com/flutter/flutter ~/flutter
24+
git clone --filter=blob:none -b main https://github.com/flutter/flutter ~/flutter
3125
TZ=UTC git --git-dir ~/flutter/.git log -1 --format='%h | %ci | %s' --date=iso8601-local
3226
echo ~/flutter/bin >> "$GITHUB_PATH"
3327

.github/workflows/update-translations.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ jobs:
2525
git reset --hard weblate/main
2626
2727
- name: Clone Flutter SDK
28-
# We can't do a depth-1 clone, because we need the most recent tag
29-
# so that Flutter knows its version and sees the constraint in our
30-
# pubspec is satisfied. It's uncommon for flutter/flutter to go
31-
# more than 100 commits between tags. Fetch 1000 for good measure.
32-
# TODO(upstream): See ci.yml for why we fetch more than 1000.
28+
# Upstream's version calculation fails with a shallow clone,
29+
# so instead clone with `--filter=blob:none`.
3330
run: |
34-
git clone --depth=3000 -b main https://github.com/flutter/flutter ~/flutter
31+
git clone --filter=blob:none -b main https://github.com/flutter/flutter ~/flutter
3532
TZ=UTC git --git-dir ~/flutter/.git log -1 --format='%h | %ci | %s' --date=iso8601-local
3633
echo ~/flutter/bin >> "$GITHUB_PATH"
3734

0 commit comments

Comments
 (0)