Overview
Bard is used to manage monorepos.
Installing
Bard is meant to be installed into a "tools" folder for use with your project.
mkdir tools/bard
composer require --working-dir=tools/bard sonsofphp/bard
echo "composer.lock\nvendor/" > tools/bard/.gitignore
php tools/bard/vendor/bin/bardUsage
Initialize a new bard.json file for new monorepos.
bard initAdding Repositories
bard add path/to/code repoUrlPush changes to read-only repos
bard pushCreate a release
bard release major
bard release minor
bard release patchBard will track the versions so you can just use the keywords: major, minor, patch.
Copy files
Copy the LICENSE file from the root to all packages
bard copy LICENSEMerging composer.json files
composer.json filesWhen you have to maintain the composer.json files, this command will take the packages and merge those into the main composer.json file. It will also update the package's composer.json file with the correct values as well.
bard mergeLast updated
Was this helpful?