More Build Automation
I wanted to move my build script one level further back - meaning, I wanted to have it work like this:
- Fire off an image
- Load all the latest code from Store
- Drop each package/bundle from the image into a build directory
- Fire off a new, clean image, load the parcels, and proceed from there
That way I could ensure that a build actually had the latest code, instead of the latest code I remembered to parcel out - and my build doesn't need any of the Store machinery in it. So, here's the guts of that new script. First, some code to load a package from Store, then dump it out as a parcel:
savePackageBlock := [:name :dir | | pkg | pkg := Store.PackageModel allInstances detect: [:each | each name = name]. pkg saveAsParcel: (dir asFilename construct: name) saveStructure: true saveLinks: true]. (Store.Package newestVersionWithName: 'MyCounter') loadSrc. savePackageBlock value: 'MyCounter' value: 'buildTest'.
That's easily built up to more packages. Then I just add this new script to what I last posted on, and bam - I go from a clean image and an empty build directory to a full build directory and a clean build. Pretty nice :)