[squeak-dev] Re: [ANN] Mason 1.0

Colin Putney cputney at wiresong.ca
Mon Dec 14 09:08:41 UTC 2009


On 2009-12-13, at 10:25 PM, Andreas Raab wrote:

> Hi Colin -
> 
> I looked briefly at Mason, but I'm clearly missing a bit of documentation :-) Could you perhaps make a very brief tutorial that includes how to load specific packages and how to set up an environment that builds it? Specifically, I'd be interested in what a Mason setup would look like that would allow us to automatically build up from a core to a standard image from MC packages, run all the tests, and package and save the result (and if supported, how to upload it to Squeak.org and mail the test results to Squeak-dev ;-)

1. create a directory for the tutorial
2. copy a trunk image into the directory, name it 'trunk.image'.
3. make another copy of the trunk image, name it 'mason.image'.

4. In mason.image, create a class called MDStandardImageProduct.
5. Implement the following method:

specifyOn: targets
	| repository |
	repository := MCHttpRepository
		location: 'http://squeak.krampe.se/public/'
		user: ''
		password: ''.

	targets image
		name: 'Squeak-Standard-3-11';
		baseImage: FSLocator image resolve parent / 'trunk.image';
		with: [targets version name: 'Blackfoot-gk.6.mcz' repository: repository].
		
	targets tests
		name: 'results';
		imagePath: 'Squeak-Standard-3-11';
		with: [targets suite package: 'Blackfoot'].
			
6. In a workspace execute 'MDStandardImageProduct build'.


This should product a directory called something like build-123.1. Inside that
directory will be an image called Squeak-Standard-3-11.image. It will have
Göran's Blackfoot SimpleCGI server loaded. 

There will also be an image called results.image and a file named results.txt.
This is the image in which the tests were run, and the result of the tests
respectively.

And that's it. There's currently no support for uploading the image or mailing
the test results, but that could certainly be implemented. 

The #specifyOn: method uses a Canvas-style protocol - a bit like a Seaside rendering method. See MDTargetCanvas. The targets it supports right now are: #directory, #file, #image, #script, #suite, #tests and #zip.

Obviously building a complete release image from core would be a bit more involved, but it would boil down to something more or less like this.





More information about the Squeak-dev mailing list