Skip to content

Skip Unity-ignored tilde directories during package install#3

Merged
klumhru merged 1 commit intomainfrom
fix/skip-tilde-folders
Mar 28, 2026
Merged

Skip Unity-ignored tilde directories during package install#3
klumhru merged 1 commit intomainfrom
fix/skip-tilde-folders

Conversation

@klumhru
Copy link
Copy Markdown
Owner

@klumhru klumhru commented Mar 28, 2026

Summary

  • Automatically skip directories ending with ~ (e.g., Tests~, Documentation~, Samples~) when copying packages
  • These are Unity's convention for ignored folders and shouldn't be included in installed packages
  • No config changes needed — this is built-in behavior alongside .git skipping

Test plan

  • New TestCopyFiltered_SkipsTildeDirs test verifies Tests~, Documentation~, Samples~ are all skipped
  • Existing TestCopyFiltered updated to verify tilde dirs are skipped without explicit exclude patterns
  • CI passes

🤖 Generated with Claude Code

Directories ending with ~ (Tests~, Documentation~, Samples~, etc.)
are Unity's convention for ignored folders. These are now automatically
excluded during package installation without needing explicit exclude
patterns in the config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 28, 2026 10:56
@klumhru klumhru merged commit 9171f80 into main Mar 28, 2026
3 checks passed
@klumhru klumhru deleted the fix/skip-tilde-folders branch March 28, 2026 10:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the package copy/install filtering logic to automatically exclude Unity “ignored” directories whose names end with ~ (e.g., Tests~, Documentation~, Samples~) so they don’t get installed into generated packages.

Changes:

  • Add a built-in skip rule in CopyFiltered to SkipDir for any directory with a name ending in ~.
  • Update TestCopyFiltered to assert tilde directories are skipped without needing an explicit exclude pattern.
  • Add a new test covering multiple common Unity tilde directories with no exclude patterns.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/packager/filter.go Adds a walk-time directory skip for Unity tilde-suffixed directories.
internal/packager/filter_test.go Updates existing test and adds coverage to ensure tilde dirs are skipped by default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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