What tool can I use to create a "clean" archived file for a PHP WordPress Plugin that I can publish to clients, or wordpress.org?
When I want to publish a WordPress plugin to my clients I create an installable ZIP archive from that plugin. Since I use Git, it has a lot of development files and directories that I do not want to include into the build that I publish to my clients.
In the zip archive that I currently create for every version release, I make sure to e.g. remove the .git
directory, the .gitignore
and README.md
files, the .vscode
directory, the codekit config file, but leave the node_modules
and vendor
directories in.
I do this by coping the project directory to my desktop, remove the development files and directories, create the ZIP archive, rename that to the latest version, then I upload that via (s)FTP so my clients can reach it.
This is not so much a problem the first time I publish, but gets very tedious with every (small) version update.
There must be a better way to do this but I am probably searching by the wrong terms.
I've looked into;
- Git Archive: This also removes the ./vendor and ./node_modules for example
- Gitlab CI/CD (where the repositories of the plugins live): This seems way to complex, don't actually need integration and depolyment, just archiving
- Jenkings: Seems way overkill for what I'm trying to accomplish here
- Gulp: This task runner seems to be more of a tool to be used continuously while developing (watching/building .sass files etc) and not for building after the code is finished
- Phing: Seems to be a very powerful tool, maybe too powerful? Is this the way to go or are there better solutions?
... and another ton of tools
TL;DR How do I create a "clean" zip archive of a PHP git project without development files and folders?