-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from hpi-swa-teaching/feat/createSar
Add Function for SAR file creation
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
packages/BaselineOfAutoTDD.package/BaselineOfAutoTDD.class/class/createSar.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
2 changes: 1 addition & 1 deletion
2
packages/BaselineOfAutoTDD.package/BaselineOfAutoTDD.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" } } |