drupol / composer-package-artifacts
Composer plugin that allows to download a specified artifact instead of the default package.
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: >= 7.1
- composer-plugin-api: ^1.1
- ext-json: *
- ext-zip: *
Requires (Dev)
This package is auto-updated.
Last update: 2020-12-21 19:10:04 UTC
README
Composer Package Artifacts
Composer plugin that allows to download a specified artifact instead of the default dist
URL, this allows
to download all artifact dependencies too.
Table of contents:
Installation
The recommended way of installing the plugin is via [Composer][2].
composer require drupol/composer-package-artifacts
Usage
Edit the composer.json file and add the following in your extra
section:
{ "extra": { "artifacts": { "foo/bar": { "provider": "github", "dist": { "url": "https://github.com/{name}/releases/download/{version}/{project-name}-{version}.tar.gz", "type": "tar" } }, "abc/def": { "provider": "local", "dist": { "url": "file://somewhere/local/{version}/{project-name}-{version}.tar.gz", "type": "tar" } } } } }
This will fetch dist
content from:
https://github.com/foo/bar/releases/download/0.1.0/bar-0.1.0.tar.gz"
Valid type
values are tar
and zip
while available URL replacement tokens are:
{name}
: the full package's name without version info, e.g.foo/bar
{vendor-name}
: just the vendor name, e.g.foo
{project-name}
: just the project name, e.g.bar
{pretty-version}
: the pretty (i.e. non-normalized) version string of this package, e.g.0.1.0
{version}
: the full version of this package, e.g.0.1.0.0
{stability}
: the stability of this package, e.g.dev
,alpha
,beta
,RC
orstable
{type}
: the package type, e.g.library
{checksum}
: the SHA1 checksum for the distribution archive of this version