-
Notifications
You must be signed in to change notification settings - Fork 0
Commands
The general form of the scripting API allows for the specification of the project, version, and repository to be used in a specific command:
Metacello new
project: 'Sample';
version: '1.0';
repository: 'http://example.com/sample';
<api command>.
###project: ###version: ###repository:
##Commit ###Returns The commit command returns a list of package specs. ###Example
Metacello new
project: 'Sample';
commit: 'commit comment'.
##Dirty ###Returns The commit command returns a list of modified package specs. ###Example
Metacello new
project: 'Sample';
dirty.
Metacello new
project: 'Sample';
version: '1.0';
repository: 'http://example.com/sample';
fetch.
##Find ###Returns The find command returns a project spec. ###Example
Metacello new
project: 'Sample';
find.
##Get ###Returns The get command returns a project. ###Example
Metacello new
project: 'Sample';
version: '1.0';
repository: 'http://example.com/sample';
get.
##Load The load command loads the specified version of a project into your image.
For an .mcz-based repository, the configuration of the given project is loaded from the given repository:
Metacello new
project: 'Sample';
version: '1.0';
repository: 'http://example.com/sample';
load.
The specification for the given version is resolved from the configuration and then the version is loaded.
For a github-based repository, the load order and dependency information is obtained from the metacello.json file in the given repository:
Metacello new
project: 'Sample';
version: 'master'
repository: 'github://dalehenrich/sample/core';
load.
The version may be the name of a branch, name of a tag, or SHA of a commit. The repository description is parsed according these rules.
If no arguments are specified to the load command, the default group is loaded. If no default group is defined, all of the packages and projects defined in the project are loaded.
If arguments are specified to the load command:
Metacello new
project: 'Sample';
version: '1.0';
repository: 'http://example.com/sample';
load: #( 'Sample-Tests' ).
The specified projects/packages/groups are loaded into your image along with any dependent projects and packages.
The load command returns a Metacello loader. When printed the the loader display the contents of the load directive and provides a complete list of the projects and packages loaded into your image:
a MetacelloFetchingMCSpecLoader(linear load :
atomic load : baseline [MetacelloGitHubProject]
atomic load : baseline [MetacelloGitHubProject]
load : External-Core-dkh.2
load : Sample-Core-dkh.3
load : Sample-Platform.pharo-dkh.2
load : Sample-Tests-dkh.2)
##Record ###Returns The record command returns a load directive. ###Example
Metacello new
project: 'Sample';
repository: 'github://dalehenrich/sample:master/core';
record.
##Register ###Returns The register command returns a project spec. ###Example
Metacello new
project: 'Sample';
repository: 'github://dalehenrich/sample:master/core';
register.
##Updates ###Returns The updates command returns a list of project spec. ###Example
Metacello new
project: 'Sample';
updates.
##Upgrade ###Returns The upgrade command returns a load directive. ###Example
Metacello new
project: 'Sample';
version: 'master';
repository: 'github://dalehenrich/sample/core';
upgrade.