Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wemakecustom/gitlab-composer
Gitlab Composer repository
https://github.com/wemakecustom/gitlab-composer
Last synced: 3 months ago
JSON representation
Gitlab Composer repository
- Host: GitHub
- URL: https://github.com/wemakecustom/gitlab-composer
- Owner: wemakecustom
- Created: 2013-08-22T21:18:56.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T12:10:28.000Z (over 6 years ago)
- Last Synced: 2024-05-03T02:03:43.300Z (6 months ago)
- Language: PHP
- Size: 25.4 KB
- Stars: 162
- Watchers: 18
- Forks: 44
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-composer - GitLab-Composer - This is a branch/tag indexer for GitLab repositories. (Packagist-compatible repositories / Satis)
README
# Gitlab Composer repository
Small script that loops through all branches and tags of all projects in a Gitlab installation
and if it contains a `composer.json`, adds it to an index.This is very similar to the behaviour of Packagist.org
See [example](examples/packages.json).
## Installation
1. Run `composer.phar install`
2. Copy `confs/samples/gitlab.ini` into `confs/gitlab.ini`, following instructions in comments
3. Ensure cache is writable
4. Change the TTL as desired (default is 60 seconds)
5. Ensure an alias exists for /packages.json => /packages.php (.htaccess is provided)## Usage
Simply include a composer.json in your project, all branches and tags respecting
the [formats for versions](http://getcomposer.org/doc/04-schema.md#version) will be detected.By default, the package `name` must be equal to the path of the project. i.e.: `my-group/my-project`.
This is not a design requirement, it is mostly to prevent common errors when you copy a `composer.json`
from another project without changing its name. To enable support for differences between package names and project
paths, set `allow_package_name_mismatch` to `true` in `confs/gitlab.ini`.Then, to use your repository, add this in the `composer.json` of your project:
```json
{
"repositories": [
{
"type": "composer",
"url": "http://gitlab-composer.stage.wemakecustom.com/"
}
]
}
```## Caveats
While your projects will be protected through SSH, they will be publicly listed.
If you require protection of the package list, [I suggest this reading](https://github.com/composer/composer/blob/master/doc/articles/handling-private-packages-with-satis.md).## Author
* [Sébastien Lavoie](http://blog.lavoie.sl/2013/08/composer-repository-for-gitlab-projects.html)
* [WeMakeCustom](http://www.wemakecustom.com)