[wp-hackers] Plugin zip problem on wordpress.org

Moritz 'Morty' Strübe morty at gmx.net
Tue Nov 13 22:52:19 GMT 2007


> Situation:
>
> I have a plugin called Wonder Plugin hosted at
> http://svn.wp-plugins.org/wonder-plugin/.  Suppose I have files that
> look like this:
>
> /wonder-plugins/tags/2.1/readme.txt
> /wonder-plugins/tags/2.1/tests.php
> /wonder-plugins/tags/2.1/release/wonder.php
>
> And a readme.txt file *in trunk/* with the following line:
>
> Stable Tag: 2.1/release
>
>
> Proposal:
>
> The Plugin directory will package the zip file from the release/
> subdirectory of the 2.1 tag rather than zipping up everything.
>
> The zip file will contain the readme.txt file as well, even though the
> readme.txt file is not in the release/ directory.  (If there is
> another readme.txt file in the release/ directory it will get
> *overwritten*).
>
> The zip file will contain all of those files (release/* and
> readme.txt) wrapped in a directory called wonder-plugin/.  So the
> contents of the zip will look like:
>
> wonder-plugin/readme.txt
> wonder-plugin/wonder.php
>
> The zip file will be named wonder-plugin.zip.
>
> Zip files from other tags (downloaded from the "other versions" link,
> e.g. http://wordpress.org/extend/plugins/podpress/download/) will
> contain the *entire* SVN tree.  Why?  We determine the "packaging
> subdirectory" from the readme file in trunk/.  The directory structure
> can change between tags, so we can't know from trunk/readme.txt what
> the right thing to do is for any tag but the stable one.  We could
> parse each tag's readme.txt, but I'm not convinced that's useful for
> plugin authors or users.  This is *inconsistent*.  Is that bad?
>
> If the plugin had specified Stable Tag: trunk/release, everything
> above would apply with the trunk/ dir taken to be the stabel "tag"
> dir. (Stable Tag: trunk is equivalent to not including a Stable Tag
> field.  Including it is best practice.)
>
> If the plugin had no subdirectory in its Stable Tag field, the entire
> tag directory is packaged in the zip (this is what happens now).
>
> Thoughts?

Looking at this more closely makes things more difficult, indeed. How
about adding an option instead of enhancing one.

Stable Tag: 2.1
Release Path: release

So where is the advantage? The inconsistency will be solved. "Release
Path" is read from the directory that is packed. This would even work
for older versions, changing the readme.txt in your tag-dir. As long as
the trunk-dir-tree is the same as the tag-dir-tree there shouldn't be
any problems. - At least I can't see any. Of course packing everything
would be fall back.

Cheers
Morty

P.s.: Can you change my dir-name from post-notification to
post_notification? - If it isn't too much trouble. Otherwise it would be
nice to have an option how to name the directory, too.



More information about the wp-hackers mailing list