Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Function for SAR file creation #82

Merged
merged 2 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
exporting
createSar

| preamble zip |

zip := ZipArchive new.
preamble := String streamContents: [:preambleStream |
preambleStream
nextPutAll: '| loader |
loader := MCVersionLoader new.';
cr.
(((self project version: 'baseline') allPackagesForSpecNamed: #default) collect: #name) do: [:name | | stream version |
stream := RWBinaryOrTextStream on: (String new: 10000).
version := MCVersion
package: (MCPackage named: name)
info: ((MCPackage named: 'AutoTDD-Core') workingCopy ancestry ancestors
ifNotEmpty: #first
ifEmpty: [MCVersionInfo name: name, '-generated.1' id: UUID new message: '' date: Date today time: Time now author: 'generated' ancestors: #()]).
version fileOutOn: stream.
(zip addString: stream contents as: name, '.mcz') desiredCompressionLevel: 0.
preambleStream
nextPutAll: 'loader addVersion: (MCMczReader versionFromStream: (self memberNamed: ''';
nextPutAll: name;
nextPutAll: '.mcz'') contentStream).';
cr].
preambleStream nextPutAll: 'loader load.'].
zip addString: preamble as: 'install/preamble'.
zip writeToFileNamed: 'AutoTDD.sar'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
},
"createSar" : "ng 6/8/2021 11:50" },
"instance" : {
"baseline:" : "ct 10/7/2020 01:03",
"postLoad" : "be 5/29/2019 23:24" } }