Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving several Monticello packages at once

I am working with Pharo Smalltalk. Suppose you want to save your own group of packages into a local repository, you know that your packages are prefixed with "MyPrefix". What's the right message to do it? In code:

| myPkgs |
myPkgs := MCPackage allInstances select: [: mcPkg | mcPkg name beginsWith: 'MyPrefix' ].
myPkgs do: [ : myPkg | myPkg ??? ].

It would be too difficult to script that one for a web based repository?

like image 474
Juan Aguerre Avatar asked Oct 23 '22 19:10

Juan Aguerre


1 Answers

packages := Gofer new allResolved
        collect: [ :each | each packageName ] as: Set.
packages := packages select: [ :e | e beginsWith: 'Prefix' ].

gofer := Gofer new
    disablePackageCache;
    directory: '/path/to/repo'.
packages do: [ :p | gofer package: p ].
gofer commit: ''.
like image 170
Sean DeNigris Avatar answered Dec 21 '22 04:12

Sean DeNigris