5

我正在与 Pharo Smalltalk 合作。假设您想将自己的一组包保存到本地存储库中,您知道您的包以“MyPrefix”为前缀。正确的信息是什么?在代码中:

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

为基于 Web 的存储库编写脚本太难了?

4

2 回答 2

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: ''.
于 2011-11-13T20:32:56.463 回答
1

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

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

您可以在此博客文章中找到更多信息:Gofer — Monticello 和包组

于 2011-11-13T17:47:14.520 回答