Happy !

girba / Snapshotcello

Project infos

License MIT
Tags metacello
Creation date 2013-07-15
Website

Monticello registration

About Snapshotcello

Snapshotcello is a little tool for snapshotting any Metacello configuration in a flat list that can be loadable forever.

Developed by Stéphane Ducasse and Tudor Girba.

Summary

In short, given a version (usually a baseline) of a Metacello configuration, it creates a flat snapshot of it by: - collecting all packages from all included configurations; - compiling a snapshot method enumerating all the packages in a flat list; - installing the script in the configuration class.

Installation

Gofer new
    smalltalkhubUser: 'girba' project: 'Snapshotcello';
    package: 'ConfigurationOfSnapshotcello';
    load.
(Smalltalk globals at: #ConfigurationOfSnapshotcello) loadStable

Example

Snapshotcello new 
   configurationClass: ConfigurationOfSnapshotcello;
   configurationVersion: #development;
   publishVersion: '1.1-snapshot'

It produces a method called snapshotVersion10snapshot: in ConfigurationOfSnapshotcello like:

version10snapshot: spec
   "generated by Snapshotcello"
   <version: '1.0-snapshot'>
   spec for: #common do: [
      self populateSpec: spec with: self snapshot1 ]

This method uses the snapshot1 helper method that actually contains the list of packages and their associated versions and repositories:

snapshot1
  "generated by Snapshotcello"
  ^ #( 
        #('Snapshotcello-TudorGirba.4.mcz'  'http://www.smalltalkhub.com/mc/girba/Snapshotcello/main/'  'Snapshotcello' ) 
  )

Note that the #populateSpec:with: is also generated.