一次保存几个蒙蒂塞洛包

时间:2011-11-13 17:33:52

标签: smalltalk pharo monticello

我正在使用Pharo Smalltalk。假设您要将自己的软件包组保存到本地存储库中,您知道您的软件包前缀为“MyPrefix”。做到这一点的正确信息是什么?在代码中:

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

为基于Web的存储库编写那个脚本会非常困难吗?

2 个答案:

答案 0 :(得分:2)

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: ''.

答案 1 :(得分:1)

与加载或更新一组软件包的方式相同:

Gofer new
    squeaksource: 'MyProject';
    package: 'MyPrefix-Core';
    package: 'MyPrefix-Tests';
    commit

您在此博客文章中找到的更多信息:Gofer — Monticello and Groups of Packages