Suggested workflow to move, copy and zip files for production builds?

I’m looking for a build tool that would allow me to easily build production .zip files on Mac OS X. I’m building Wordpress themes, so the end result should be a theme.zip file

What I’m looking to do when “command build” is run:

  • Run terminal commands to launch other scripts and wait until they’ve
    completed their job ( for example generate changelog )

  • Remove unnecessary files ( node_modules/, /assets/sass/ , and hidden
    directories like .sass-cache, .git, etc. ) Search all files for
    left-overs ( console.log, var_dump, etc. )

  • Perform all changes above on a “virtual copy” rather than the
    development directory. For example, I don’t want my node_modules
    completely removed, but I don’t want to zip it for the end-user
    either. All the tasks should be performed on a virtual copy of the
    actual directory.

  • I should also be able to decide exactly when should the “virtual
    copy” be created. For example - I need to run “generate
    changelog.txt” before the “virtual copy” is created.

  • Move the created .zip file to a specified directory in Dropbox.

  • When everything is done, launch another configuration/instance of the
    build tool to .zip the file that was created along with the
    documentation files and resources to create the final .zip file
    (zipception :o)

  • Ability to dynamically rename the output the final .zip file
    according to a terminal command output ( for example the build tool
    would run my complex ruby script that would output the equivalent of
    ruby -e ‘puts “Version 1.1.1”’ and call the end file “Awesome Package
    Version 1.1.1.zip” )

  • Make it easy to reconfigure the name, version, input/output
    directories. As a theme developer - I have ever-growing project list.

I know that there are tools like Grunt and Gulp, and I’m using them for compiling Sass, minifying JS, etc., but I don’t think that they’re well suited for the tasks above. I think it’s possible to do everything above with Gulp, but I think it requires knowledge of node-streams, which I lack.

Surely I can’t be the only one who is looking to streamline the build-process of files, I just can’t find the right keywords to search with, so I’m seeking the help of the wonderful developer community :).

Any workflow suggestions are going to be appreciated. Thanks!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.