Download the PHP package valorin/deploy without Composer
On this page you can find all versions of the php package valorin/deploy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package deploy
Deploy
Deploy was inspired by Laravel Envoy, with the aim to provide a very simple way to deploy your code into production while ensuring valid version tags are applied. It allows you to deploy into staging/acceptance at any time, while adding an extra version tag check when you push to production, to ensure all production releases are tagged appropriately.
It uses the remote hosts configured in app/config/remote.php
, and integrates into your application as an Artisan
command, so deploying code is as easy as: ./artisan deploy
.
As of v1.2, it includes the ability to specify custom tags which can be replaced when the command is being executed, to allow you to specify a command like this:
But apply a custom branch and remote name as needed:
Installation
Add the package to your application with composer:
Add the DeployServiceProvider
service provider to the providers
list in ./app/config/app.php
:
Update app/config/remote.php
with at least one remote host.
Usage
To deploy to a remote host specified in app/config/remote.php
, run the deploy
command and specific the remote host name (the key, not the hostname), or leave it blank to use the default remote:
By default, Deploy will do the following:
First, in the local environment, it will check the specified remote name.
If this is production
, it will trigger the version tag check.
The version tag check looks for a valid semantic version tag on the latest commit. If none is found, it will calculate the next possible version for a number of release types (major, minor, patch, rc, etc), and prompt you to chose one. When you've selected a valid version, Deploy will tag your latest commit.
Once there is a valid version tag, or you're not deploying to production, Deploy will
do a git push
to make sure you haven't forgotten to push anything.
After a successful push, it will connect to the remote server and run the predefined commands list:
Note: All of these options and behaviours are customisable in the configuration.
Using Option Tags
Deploy supports the user of option tags to allow you pass parameters (and even commands) via the command line when you run deploy, rather than needing to manually extend and edit the config file.
As seen in the default commands list above tags are in the format {option}
or
{option|default}
. When you specify a {option}
without a default value, Deploy will
throw an error if the option is not provided.
Options are specified by adding an argument in the format --set-option=value
, with --set-
prefixed
onto the name of the option.
Using the default commands (shown above), you can tell Deploy to use the github
remote and
the production
branch like this:
Configuration
To change the default configuration, run:
And then edit the configuration file at:
The file will contain explinations for each of the options, so you can customise Deploy as much as you require.
Version History
- v1.3.0
- Supporting Laravel 5 and the removal of Remote/SSH from the Laravel core framework.
- v1.2.1
- Removed DownSafe command, due to merged bugfix in Laravel.
- v1.2.0
- Implemented option tags to make commands more flexible.
- Added key names to each default command to make extending easier.*
- Cleaned up the next version prompt with a new selector.
- v1.1.0
- Cleaned up the default config so it's friendlier for new users.
- v1.0.0
- Initial Release
* Note, there is a bug which prevents nested package configs from cascading nicely.