/packzip

[UNUSED] MailPoet 2/Wysija: The Wordpress plugin development automation tool.

Primary LanguageRuby

Packzip.

The Wordpress plugin development automation tool. Packzip is a Ruby/Sinatra app that is able to pack, compress, translate and zip your project. It also exposes an API that can be used to check version numbers and download packages.

Packzip

Features.

  • Pull from a remote git repository.
  • Minify JS files.
  • Compress CSS files.
  • Pull latest .po files from Transifex.
  • Convert .po files to .mo files.
  • Output a .zip file.

System Dependencies.

Setup.

  1. Requirements: You plugin repository should have two branches, dev and master, and the directory structure should follow our Barebone structure.

  2. Clone Packzip:

$ git clone git://github.com/Wysija/packzip.git
$ cd packzip
  1. Add a good username/password and your git repo url to the .env file:
# .env
USERNAME=admin
PASSWORD=password
GIT_URL="git://github.com/Wysija/barebone.git"
  1. Initialize your transifex directory, in /tmp/transifex:
$ cd tmp/transifex
$ tx init
$ tx set --auto-remote  https://www.transifex.com/projects/p/project-name/
  1. Set the following filter by editing tmp/transifex/.tx/config and pull manually the first time:
# config
file_filter = project-name-<lang>.po
$ tx pull -a

Deploy.

  • Development: the app will use a shotgun/puma local server, running with foreman.
$ bundle install --without production
$ bundle exec foreman start  -f Procfile.development
  • Production: the app will use a puma instance listening on unix:///tmp/packzip.sock and running with foreman. Configure your Apache or Nginx proxy upstream with that socket.
$ bundle install --without development
$ bundle exec foreman start

API

  • Check latest version number:
get '/release/check?branch=(dev | master)'
# => x.x.x
  • Get zip file:
get '/release/zip?branch=(dev | master)'
# => zip file stream

Thanks to:

License.

MIT