Some explanation: - clone gut version into REPOSITORY - it will iterate list of PACKAGES and for each new version, will flush to disk and commit it with same commit message as monticello commit (so I can query messages without digging in mcz info) - it will do a push at the end
I suppose it can be easily adapted to your needs :) Esteban > On 05 Aug 2015, at 17:37, Esteban Lorenzano <[email protected]> wrote: > > I use this to keep my VMMaker mirror (as shown in > https://ci.inria.fr/pharo/view/5.0-VM-Spur/job/Spur-VMMaker-Tracker/configure > <https://ci.inria.fr/pharo/view/5.0-VM-Spur/job/Spur-VMMaker-Tracker/configure>): > > > > set -e > > eval `ssh-agent` > ssh-add $HOME/.ssh/id_rsa_estebanlm > > PACKAGES="'VMMaker.oscog'" > REPOSITORY=cog > > # Clone > git clone -b spur64 [email protected]:estebanlm/pharo-vm.git $REPOSITORY > cd $REPOSITORY > git config --local user.email "[email protected] > <mailto:[email protected]>" > git config --local user.name "Esteban Lorenzano" > cd - > > > # Get Pharo (and prepare it) > wget -O- get.pharo.org/50+vm <http://get.pharo.org/50+vm> | bash > ./pharo Pharo.image get OSProcess > > # Execute sync script > ./pharo Pharo.image eval " > | origin destination | > > origin := (MCHttpRepository location: 'http://source.squeak.org/VMMaker' > <http://source.squeak.org/VMMaker'>) > instVarNamed: 'cacheFileNames' put: true; > yourself. > destination := MCFileTreeRepository new > directory: '$REPOSITORY/mc' asFileReference ensureCreateDirectory; > instVarNamed: 'cacheFileNames' put: true; > yourself. > > #($PACKAGES) do: [ :eachPackageName | > | infoOrigin infoDest versionNumber newer | > > VTermOutputDriver stdout black: 'Updating ', eachPackageName; lf. > > infoOrigin := origin versionInfoFromVersionNamed: eachPackageName. > infoDest := destination versionInfoFromVersionNamed: eachPackageName. > versionNumber := infoDest versionNumber. > > newer := (({infoOrigin}, (infoOrigin allAncestors)) > select: [ :each | > each versionNumber > versionNumber > or: [ > each versionNumber = versionNumber > and: [ each id ~= infoDest id ] ] ]) > sorted: [ :a :b | a timeStamp < b timeStamp ]. > > newer do: [ :each | | summary | > [ > VTermOutputDriver stdout green: ('New version: ', each > name); lf. > > VTermOutputDriver stdout << 'Store ' << each name << ' > in ' << destination description; cr. > destination storeVersion: (origin versionFromFileNamed: > (each name, '.mcz')). > > VTermOutputDriver stdout << 'Commit ' << each name; cr. > summary := each summary copyReplaceTokens: String cr > with: String crlf. > OSProcess waitForCommand: '(cd $REPOSITORY; git add -A > ; git commit -m \"', summary, '\")' ] > on: Error do: [ :e | > VTermOutputDriver stdout yellow: ('Warning: ', e > messageText); lf ] ] ]. > > VTermOutputDriver stdout << 'OK'; cr. > " > > cd $REPOSITORY > git push --force origin spur64 > git branch --verbose > cd - > >> On 05 Aug 2015, at 16:54, Sean P. DeNigris <[email protected] >> <mailto:[email protected]>> wrote: >> >> Tudor Girba-2 wrote >>> But, we could try to mirror the SmalltalkHub repo into GitHub. I do not >>> know how to do that, but if someone would like to do it, it would be >>> great. >> >> IIRC it's pretty easy. One can use GitFileTree to copy the packages from the >> St repo to the GH repo. Maybe someone has a script for this already?... >> >> >> >> ----- >> Cheers, >> Sean >> -- >> View this message in context: >> http://forum.world.st/Google-Code-Shutdown-tp4814760p4841101.html >> <http://forum.world.st/Google-Code-Shutdown-tp4814760p4841101.html> >> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com >> <http://nabble.com/>. >> >
