Skip to content

Conversation

Copy link

Copilot AI commented Dec 7, 2025

Build workflows failed on Windows/macOS when fetching tags due to repository containing both V4.10.8 and v4.10.8. Case-insensitive filesystems cannot distinguish these references, causing git fetch --tags to fail with reference conflicts.

Changes

  • Modified tag existence checks to fetch specific tags instead of all tags
  • Check local refs first (already available from checkout), then fetch individually if needed
  • Applied to all three platform workflows: Windows, macOS, Linux

Before

git fetch --tags origin  # Fails on case-insensitive FS
if git rev-parse --verify --quiet "refs/tags/$TAG" >/dev/null; then

After

# Check local first, then fetch specific tag only
if git rev-parse --verify --quiet "refs/tags/$TAG" 2>/dev/null; then
  echo "Found locally"
else
  git fetch origin "refs/tags/$TAG:refs/tags/$TAG" 2>/dev/null
fi

This eliminates the filesystem conflict while preserving tag validation functionality.

Original prompt

https://github.com/TanNhatCMS/FlyEnv/actions/runs/20006714350 fix lỗi build này và bạn có thể build thử không


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 7, 2025 16:21
…onflict

The issue was caused by two tags with different cases (V4.10.8 and v4.10.8) in the repository. On case-insensitive filesystems (Windows, macOS default), git fetch --tags fails with a reference conflict.

Solution: Instead of fetching all tags, we now:
1. Check if the tag exists locally first (from checkout)
2. If not found locally, fetch only the specific tag needed
3. Handle fetch failures gracefully

This avoids the case-insensitive filesystem conflict while still checking if tags exist.

Co-authored-by: TanNhatCMS <113796420+TanNhatCMS@users.noreply.github.com>
Made error redirection consistent across all tag checking commands for better code clarity.

Co-authored-by: TanNhatCMS <113796420+TanNhatCMS@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build issue in FlyEnv action Fix git fetch tag conflicts on case-insensitive filesystems Dec 7, 2025
Copilot AI requested a review from TanNhatCMS December 7, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants