Download the PHP package vetruvet/laravel-self-updater without Composer
On this page you can find all versions of the php package vetruvet/laravel-self-updater. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vetruvet/laravel-self-updater
More information about vetruvet/laravel-self-updater
Files in vetruvet/laravel-self-updater
Package laravel-self-updater
Short Description Git webhook self-updater for Laravel
License Apache-2.0
Informations about the package laravel-self-updater
Laravel Self-Updater
This provides automatic self-update functionality for Laravel 4.x projects using git with a central git server that supports webhooks (like Github or Gitlab).
What it does
The updater is triggered by a POST request executed by the git server when a push occurs. Once triggered it does:
- Checks that the push was to the branch it is configured for
- Fire pre-update event listener
- Checks tree status to make sure it is clean before pulling
- Execute
git pull
. - Get the current commit hash (for display purposes)
- Get the list of commits pulled.
- Rebuild optimized class file (
clear-compiled
,dump-autoload
,optimize
) - Run all migrations
- Fire post-update event listener
- Optionally notify of the update status by email
Requirements
- Laravel 4.x
- Your git project in a git repository that has webhooks
- git installed on the web server
Install
Require this package in your composer.json and run composer update (or run composer require vetruvet/laravel-self-updater:dev-master
directly):
"vetruvet/laravel-self-updater": "dev-master"
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
Configure
To customize the configuration, run the following command:
Configuration options:
To customize the update notification email, run the following command:
Now, set up the webhook in your git server to point to the route specified in the configuration (/trigger_update
by default) and you're done!
Event Listeners
Planned Features
- Update composer packages after pull (requires composer.lock to be committed)
- Restart queue daemon(s) and other background stuff (somehow, no idea how yet).
Feature suggestions are welcome and much appreciated.