vysokeskoly/deb-build

Utilities for building deb packages of PHP apps

7.1.0 2023-08-29 07:16 UTC

This package is auto-updated.

Last update: 2024-04-29 08:49:45 UTC


README

Latest Stable Version License Checks Build Coverage Status

Build deb package of PHP application using Robo task runner.

How to install and use

First install this package as composer dependency:

composer require vysokeskoly/deb-build:dev-master
  • NOTE it must NOT be installed as --dev dependency, as it is needed for postinst which is triggered on during installation on target server.

Then you can copy example RoboFile.php:

cd {YOUR_PROJECT}
cp vendor/vysokeskoly/deb-build/example/RoboFile.php ./RoboFile.php

Now just edit RoboFile.php and resolve all TODOs and check/edit other configuration.

Autoloading

  • You can require Tasks and Traits in your own RoboFile.php.
  • Or you can use the predefined autoloader:
require __DIR__ . '/vendor/vysokeskoly/deb-build/src/autoload.php';
  • It is not recommended (though it may be possible in some cases) to use vendor/autoload.php of your application, because it may (and most probably will) conflict with robo.phar inner dependencies (like Symfony).

Build a deb package

Build a deb package

sudo apt-get install ruby-dev gcc make
sudo gem install fpm

export BUILD_NUMBER=666
bin/robo build:deb