Skip to content

Add a .distignore to keep dev tooling out of the release archive - #16

Merged
2ndkauboy merged 1 commit into
developfrom
add-distignore
Sep 13, 2026
Merged

2ndkauboy merged 1 commit into
developfrom
add-distignore

Conversation

@2ndkauboy

@2ndkauboy 2ndkauboy commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

wp dist-archive has no fallback when no .distignore is present: it packages every file in the directory. With neither .distignore nor .gitattributes in the repository, the archive built by the Plugin Check workflow therefore contained .git/, .github/, .wordpress-org/ and phpcs.xml — exactly the hidden files the check flags — and, when the workflow is run locally with act (which copies the whole working tree instead of doing a clean checkout), also vendor/, node_modules/, artifacts/ and .phpunit.result.cache.

List the development and CI tooling explicitly so the archive holds only language-fallback.php and readme.txt. This makes the comment in .github/workflows/wordpress-plugin-check.yml about a .distignore-driven build accurate, and aligns the checked archive with what 10up/action-wordpress-plugin-deploy actually ships to wordpress.org.

Verified locally with wp dist-archive ., which now produces an archive containing exactly language-fallback/language-fallback.php and language-fallback/readme.txt.

🤖 Generated with Claude Code

`wp dist-archive` has no fallback when no `.distignore` is present: it
packages every file in the directory. With neither `.distignore` nor
`.gitattributes` in the repository, the archive built by the Plugin Check
workflow therefore contained `.git/`, `.github/`, `.wordpress-org/` and
`phpcs.xml` — exactly the hidden files the check flags — and, when the
workflow is run locally with `act` (which copies the whole working tree
instead of doing a clean checkout), also `vendor/`, `node_modules/`,
`artifacts/` and `.phpunit.result.cache`.

List the development and CI tooling explicitly so the archive holds only
`language-fallback.php` and `readme.txt`. This makes the comment in
`.github/workflows/wordpress-plugin-check.yml` about a `.distignore`-driven
build accurate, and aligns the checked archive with what
`10up/action-wordpress-plugin-deploy` actually ships to wordpress.org.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

❌ Status: Failed

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
1 1 0

❌ Errors (1)

📁 language-fallback.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@2ndkauboy
2ndkauboy merged commit 684924d into develop Sep 13, 2026
1 check failed
@2ndkauboy
2ndkauboy deleted the add-distignore branch September 13, 2026 13:03
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.

1 participant