[英]How to copy several Monticello commits from local repository to Smalltalkhub.com automatically?
我在白天將多個版本的Monticello軟件包提交到磁盤上的本地存儲庫。
稍后我想將本地存儲庫與Smalltalkhub.com存儲庫同步。
目前,我使用Monticello瀏覽器將本地提交逐個手動復制到Smalltalkhub存儲庫。
我該如何自動執行此任務?
在Gofer章節的“深入pharo”新的免費書(pharo by example two - http://rmod.lille.inria.fr/pbe2/ 。)我詳細介紹了Gofer。 特別是我提出了一些在存儲庫之間遷移的方法
Gofer的默認設置是獲取和拉取,基於您可以輕松構建同步。
例如,如果您使用Smalltalk集線器
Gofer new
smalltalkhubUser: 'PharoBooks' project: 'GoferExample';
package: 'PBE2GoferExample';
package: 'PBE2GoferExampleSecondPackage';
push.
Gofer new
smalltalkhubUser: 'PharoBooks' project: 'GoferExample';
package: 'PBE2GoferExample';
package: 'PBE2GoferExampleSecondPackage';
fetch
您還可以獲得以下信息
((Gofer new
smalltalkhubUser: 'Pharo' project: 'NativeBoost'; allResolved)
groupedBy: [ :each | each packageName])
現在您也可以遷移
| go |
go := Gofer new squeaksource3: 'Pharo20'.
go allResolved
do: [ :each | self crLog: each packageName.
go package: each packageName;
fetch]
然后,一旦獲得本地目錄中的文件,就可以推送到另一個存儲庫。
| go |
go := Gofer new.
go repository: (MCHttpRepository
location: 'http://ss3.gemtalksystems.com/ss/rb-pharo'
user: 'pharoUser'
password: 'pharoPwd').
(((FileSystem disk workingDirectory / 'package-cache') allFiles
select: [:each | '*.mcz' match: each basename])
groupedBy: [:each | (each base copyUpToLast: $-) ]) keys
do: [:name | go package: name; push]
您可以使用Gofer自動執行Monticello任務。
Gofer new
package: 'MyProject-Core';
package: 'MyProject-Tests';
url: 'http://smalltalkhub.com/mc/USER/MyProject/main/' username: 'USER' password: '***';
push.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.