Download the PHP package jamielsharief/updater without Composer
On this page you can find all versions of the php package jamielsharief/updater. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jamielsharief/updater
More information about jamielsharief/updater
Files in jamielsharief/updater
Package updater
Short Description Application updates and upgrades
License Apache-2.0
Informations about the package updater
Updater
Updater is an application updater, it will update and upgrade your deployed applications to the latest release running any tasks before and after each update that are specific to each each release.
Whilst this was originally designed so that applications can be updated by clients or automatically (through a CRON job), I think this might be interesting in the deployment/release cycle.
It works with composer repositories such as packagist.org or static repositories generated by satis. Private repositories can be protected using authentication and update will store and request when needed.
Installation
You can build from source or download updater
from the releases section.
Download the Source Code
Download the source and build updater
application.
Now build the PHAR, this will create bin/updater.phar
, you can copy this into your application bin
folder.
Copy globally
To install globally copy
Usage
Create updater.json
in your application project folder, and in each release you can configure it to run before
and after
commands, bash or PHP scripts - if and when needed.
If you are using a private satis repository, change the url
in the updater.json
, e.g. https://www.example.com
and setup authentication for composer
, if required.
Authentication
Currently only http-basic
authorization is supported, to work with this simply create the auth.json
in your project directory. However you can also generate a satis private repository which can then connect to various repositories and supports more authentication methods.
Composer can create this for you as well
composer config http-basic.example.com username password --global
Initializing the Project
To get started with updater
you need to initialize the project.
Run the updater init
command to initialize the updater, you will be prompted for the current version, and updates after this will be pulled.
Updating
To update your application just run the following command, which will run all updates that are available in sequence.
If you want to run all available updates in the current major version
You can use the
--verbose
option to see the output of the scripts, if any
If you want to test the update using a specific composer version (including development branch), this will use the specific version and it will not update the lock file.
Upgrading
This will only upgrade to the next major version if there are no pending updates, and it will not update any versions after the first next major version.
To upgrade to the next major release run the upgrade
command.
You can use the
--verbose
option to see the output of the scripts, if any
If you want to test the upgrade using a specific composer version (including development branch), this will use the specific version and it will not update the lock file.
Demo
Building the PHAR will fail if you do not remove this directory when you have finished.
Download the source and dependencies
Now download the sample project into a sub folder, e.g. updater/demo
so you can run updater without
building the PHAR file.
The first version does not have the updater.json
, so create this in demo
folder, and set the
URL to the repository.
Initialize updater
, mentioning the directory where you extracted the zip archive too.
Then run the update
command to get the next available update
Now, you can run it a few times or use the --all
.
Once you are ready to upgrade the application to the next major version, run
All versions of updater with dependencies
ext-zip Version *
originphp/http-client Version ^3
originphp/validation Version ^2
originphp/filesystem Version ^3.0
originphp/zip Version ^2
originphp/console Version ^3.11