The best approach is to use Configurations and the config handler:

$ ./pharo Pharo.image config
Command line handler for dealing with Metacello configurations from the command 
line

Usage: config [--help] <repository url> [<configuration>] 
[--install[=<version>]] [--group=<group>] [--username=<username>] 
[--password=<password>]
        --help              show this help message
        <repository url>    A Monticello repository name 
        <configuration>     A valid Metacello Configuration name
        <version>           A valid version for the given configuration
        <group>             A valid Metacello group name
        <username>          An optional username to access the configuration's 
repository
        <password>          An optional password to access the configuration's 
repository
        
Examples:
        # display this help message
        pharo Pharo.image config
        
        # list all configurations of a repository
        pharo Pharo.image config $MC_REPOS_URL
        
        # list all the available versions of a confgurtation
        pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo
        
        # install the stable version
        pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install
        
        #install a specific version '1.5'
        pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install=1.5
        
        #install a specific version '1.5' and only a specific group 'Tests'
        pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install=1.5 
--group=Tests

The following article contains this approach as well:

 http://zn.stfx.eu/zn/build-and-deploy-1st-webapp/

 http://zn.stfx.eu/zn/build-and-deploy-1st-webapp/#deployingforproduction

HTH,

Sven

On 02 May 2014, at 13:28, Bernat Romagosa <[email protected]> 
wrote:

> Is there a way to do it?
> 
> Here's my attempt:
> 
> pharo-vm-nox MyImage.image eval "Gofer new smalltalkhubUser: 'myUser' 
> project: 'MyProject'; package: 'MyPackage'; load. Smalltalk snapshot: true 
> andQuit: true"
> 
> then:
> 
> pharo-vm-nox MyImage.image eval --no-quit "MyJustLoadedClass start"
> 
> results in:
> 
> UndefinedObject>>DoIt (MyJustLoadedClass is Undeclared)
> MessageNotUnderstood: receiver of "start" is nil
> 
> Thanks!
> Bernat.
> 
> -- 
> Bernat Romagosa.


Reply via email to