fix: quote exclusion patterns in make package / sync-svn - #7
Merged
Merged
Conversation
…ug shipped 482MB zips)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shipped bug from #3 (A5, unified excludes): the exclusion patterns were stored in make variables with
\"escaping, which make passes to the shell literally — the shell then treats\"pat\"as a quoted literal quote character, sozipreceived patterns like"node_modules/*"(with the quote marks) that match nothing.Result:
make packageproduced a 482 MB / 20,883-filedist/cardea.zip(full.playwright-browsers/,node_modules/, … included) instead of the ~25 KB / 14-entry plugin zip. Nobody hit it before becausemake packagehadn't run since #3 merged (1.0.1 was packaged with the pre-A5 Makefile).Fix: use plain shell quotes (make passes them through; the shell strips them), and quote the rsync
--exclude=patterns too so the shell can't glob-expand*.git*/composer.*/package*.jsonbefore rsync sees them:Verified:
make -n package/make -n sync-svn— patterns arrive shell-quoted as intendedmake package→dist/cardea.zipis 25,509 bytes / 14 entries (LICENSE, cardea.php, readme.txt, uninstall.php, includes/.php, assets/js/.php+js, languages/),cardea.phpinside is 1.0.2Package/SVN release contents are not affected by the bug (the Makefile is excluded from both; the plugin files themselves were never wrong) — this unblocks the correct
make package/make sync-svnfor the 1.0.2 WordPress.org release.