Quickly create a BaselineOf
for your new Pharo project. You specify a project name (the prefix of your packages) and a list of external project names (the prefix of packages in which your packages depend). The builder analyses your code to establish the internal and external relations between packages, and generates a boilerplate BaselineOf
for you. The package relations are established using the static analysis provided by Pharo's Tool-DependencyAnalyser
.
Example scenario: You started to code XYZ
, a new project with several packages such as XYZ-Core
, XYZ-Examples
and XYZ-Tests
.
The project needs other ("external") projects that you loaded via Metacello during the coding session: Bloc and Chalten.
Everything looks good enough to be exported out of the current Pharo image.
So, you already created a github repository, you create the .project
meta-data file via Iceberg, and you added and pushed all XYZ-*
packages to the repository.
GREAT👍 Now this builder can help you!
Install the builder:
Metacello new
baseline: 'BaselineBuilder';
repository: 'github://tinchodias/BaselineBuilder';
load.
Specify the parameters and build the new (draft) baseline:
BaselineBuilder new
projectName: 'XYZ';
externalProjectNames: #(Bloc Chalten);
build;
browseBuiltBaselineClass.
For each external project, you must fill the repo's URL, and may need choose a specific baseline group such as loads: #full
.
Remove the Draft
suffix from the class name, when ready.
In Iceberg, add the new BaselineOfXYZ
package and commit.
This script copies to clipboard a "Install" script for your README.md
(now just paste it):
BaselineBuilder new
projectName: 'XYZ';
copyToClipboardInstallMarkdownWith: 'github://MyUserName/XYZ'
By default, the builder considers internal to any package prefixed by the project's name as a prefix (XYZ-*
in the example). You need to customize the criteria when it's not the case. Builder's API provides internalPackageNamesPrefix:
and internalPackageNamesRegex:
to specify something else.
The code is licensed under MIT.