Skip to content

Alexssssss/gitlab-composer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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 will be detected.

Only requirement is that 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 without changing its name.

Then, to use your repository, add this in the composer.json of your project:

{
    "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.

Author

About

Gitlab Composer repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published