ClassicPress Development with GitHub: Creating release zips

GitHubWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with GitHub.

In the last post of this series, when discussing creating a release, I mentioned that you should upload a zip file containing the release code.

While users can download the source code directly, this will leave -master on the folder name. By creating a release zip, you can avoid this.

I have developed quite a few plugins for ClassicPress and have instances where I make changes to several plugins for release at the same time. To make this easier, I have a Windows batch command which will call 7-zip to compress all folders, in the same folder as the batch file, as zip files:

for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -xr!.git\ -xr!*~ "%%X.zip" "%%X\"

I didn’t create this command line statement all on my own, but think I might have added the argument to exclude files with a .git suffix. Unfortunately, I started using it a few months ago and do not remember from where the original script came.

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *