diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e1bb5..617659c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Private packages bootstrap changelog +## Private packages bootstrap 1.0.2 + +- New `rebuild.php` script, disabled by default, which can be called from Git hooks + ## Private packages bootstrap 1.0.1 - `bootstrap.php` fixed... again. Except the remaining empty `private-packages-bootstrap` folder. diff --git a/README.md b/README.md index 3e6aa54..f3a5f80 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ Private packages Bootstrap bootstraps local Packagist-like, using Satis to provide local repositories. +It provides: + +- sample files, easy to update and to version +- simple command to regenerate the Satis repository (`composer build`) +- a rebuild script, to add to your Git hook, in order to automatically regenerate the Satis repository ## Bootstrap the project @@ -21,6 +26,10 @@ Edit `repositories.json` and change `name` and `homepage` values. Take a look at [the boostrap readme file](skel/README.md). +## Customization + +Once installed, you are free to change the `composer.json` and `rebuild.php`, for example to change the `web` folder path, or the way to rebuild the Satis repository. + ## Requirements - PHP 5.3+ diff --git a/skel/README.md b/skel/README.md index ff7154a..073e564 100644 --- a/skel/README.md +++ b/skel/README.md @@ -1,8 +1,8 @@ -# Private packages bootstrap +# Private packages ## Overview -Private packages is a local Packagist bootstrap, using Satis to provide local repositories. +Provide local repositories using Satis. ## Installation @@ -18,7 +18,7 @@ And build the packages list: ## Access -The packages list/documentation can be accessed via `http:///private-packages/web/`. +The packages list can be accessed via `http:///private-packages/web/`. ## Usage @@ -47,6 +47,33 @@ Version this repository when required. The packages list should be re-built when a repository is updated, i.e. when new tags are created. +### Automatic build + +If your Web server is able to interpret PHP scripts, you can enable the rebuild function: + + composer enable-rebuild-hook + +This command-line copies the `rebuild.php` file in the `web` folder, and makes it available at this address: `http:///private-packages/web/rebuild.php`. + +You can access it manually, or start it from the Git `post-receive` hook, for example: + +```php +#!/usr/bin/env php + +"; print_r($output); echo "\n"; +?>