The tool will generate a satis.json
file for Satis by scanning archives based on the folder structure.
Satis is a composer's static repository generator. Read more about Satis and satis.json from the composer's documentation: https://getcomposer.org/doc/articles/handling-private-packages.md
Example repository using the tool: satis.jmerilainen.fi.
Note: The package has not yet been published to packagist
You can install the package via composer:
composer require jmerilainen/satis-builder
vendor/bin/satis-builder build [options]
Options:
--from Root of the folder to build from (required, default: ./packages)
--external JSON file including any additional/exterenal repsoitories to include (required, default: ./packages/external.jspn)
--output JSON file to generate (required, default: satis.json)
--name Name of the satis repository package, exmpale vendor/satis (required)
--homepage Homepage of the output satis repository package (required)
The tool will be generate the json based on the following folder structure:
./ # Root
βββ packages/ # All included packages, --from option
βββ <type> # First level: package type
β βββ <vendor>/ # Second level: vendor namespace
β β βββ <package-name>-<version>.zip #: Third level: package archive
β β βββ ...
β βββ ...
βββ ...
βββ external.json # json file with additional repositories
All naming should follow the composer.json's schema: The composer.json schema.
See tests/fixtures/case1
for working example.
In the Satis repository project use the satis-builder build
command to generate satis.json for Satis to consume.
Example composer.json
file:
{
"name": "vendor/satis",
"description": "oSatis Repository",
"type": "project",
"require": {
"jmerilainen/satis-builder": "dev-main",
"composer/satis": "dev-main",
},
"require-dev": {},
"scripts": {
"build-json": "vendor/bin/satis-builder build --from=packages --external=packages/external.json --name=vendor/satis --homepage=https://satis.vendor.fi --output=satis.json",
"build-satis": "vendor/bin/satis build satis.json dist",
"build": [
"@build-json",
"@build-satis",
"rm satis.json"
]
}
}
Running the composer build
will then generate the satis.json and the repository with compiled assets and archives.
See also: composer/satis
composer test
Please see CHANGELOG for more information on what has changed recently.
- Get the name and homepage defaults from the repository project's composer.json
- Validate structure and package names based on composer.json schema
- Add more options and modification possibilities based on satis.json schema
- Publish to packagist
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.