-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial sar building implementation
- Loading branch information
Showing
25 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SqueakWorkingCopy.class/instance/buildSar.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,3 @@ | ||
sar | ||
buildSar | ||
^ SquotSarBuilder buildSarFrom: self |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SqueakWorkingCopy.class/instance/writeSarToFileNamed..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,3 @@ | ||
sar | ||
writeSarToFileNamed: aString | ||
self buildSar writeToFileNamed: aString. |
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
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/addToSar..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,3 @@ | ||
sar | ||
addToSar: aSarBuilder | ||
aSarBuilder addPackage: self package at: self pathWithPackage. |
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
Empty file.
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/class/buildSarFrom..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,3 @@ | ||
instance creation | ||
buildSarFrom: aWorkingCopy | ||
^ (self newWithWorkingCopy: aWorkingCopy) buildSar |
5 changes: 5 additions & 0 deletions
5
src/Squot.package/SquotSarBuilder.class/class/newWithWorkingCopy..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,5 @@ | ||
instance creation | ||
newWithWorkingCopy: aWorkingCopy | ||
^ self new | ||
workingCopy: aWorkingCopy; | ||
yourself |
8 changes: 8 additions & 0 deletions
8
src/Squot.package/SquotSarBuilder.class/instance/addPackage.at..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,8 @@ | ||
building | ||
addPackage: aPackage at: aPath | ||
(self addedPackages includes: aPackage) ifTrue: [^ self]. | ||
self | ||
addVersion: ((MCWorkingCopy forPackage: aPackage) | ||
newVersionWithName: aPackage name | ||
message: 'Created by Squot for an export to a .sar') | ||
at: aPath. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/instance/addPreambleLine..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,3 @@ | ||
accessing | ||
addPreambleLine: aString | ||
self preamble: self preamble, aString, String cr. |
12 changes: 12 additions & 0 deletions
12
src/Squot.package/SquotSarBuilder.class/instance/addVersion.at..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,12 @@ | ||
building | ||
addVersion: aVersion at: aPath | ||
| stream mczPath | | ||
(self addedPackages includes: aVersion package) ifTrue: [^ self]. | ||
stream := RWBinaryOrTextStream on: (String new: 10000). | ||
aVersion fileOutOn: stream. | ||
mczPath := (SquotPathUtilities asString: aPath), '.mcz'. | ||
(self zip addString: stream contents as: mczPath) | ||
desiredCompressionLevel: 0. "mcz is already compressed" | ||
self addPreambleLine: ('self fileInMonticelloZipVersionNamed: {1}.' | ||
format: {mczPath printString}). | ||
self addedPackages add: aVersion package. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/instance/addedPackages..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,3 @@ | ||
accessing | ||
addedPackages: aSet | ||
addedPackages := aSet |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/instance/addedPackages.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,3 @@ | ||
accessing | ||
addedPackages | ||
^ addedPackages |
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,5 @@ | ||
building | ||
buildSar | ||
self mappers do: [:each | each addToSar: self]. | ||
self zip addString: self preamble as: 'install/preamble'. | ||
^ self zip |
7 changes: 7 additions & 0 deletions
7
src/Squot.package/SquotSarBuilder.class/instance/initialize.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,7 @@ | ||
initialize-release | ||
initialize | ||
super initialize. | ||
self | ||
zip: ZipArchive new; | ||
preamble: ''; | ||
addedPackages: Set new. |
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,3 @@ | ||
accessing | ||
mappers | ||
^ self workingCopy mappers |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/instance/preamble..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,3 @@ | ||
accessing | ||
preamble: aString | ||
preamble := aString |
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,3 @@ | ||
accessing | ||
preamble | ||
^ preamble |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/instance/workingCopy..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,3 @@ | ||
accessing | ||
workingCopy: aWorkingCopy | ||
workingCopy := aWorkingCopy |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSarBuilder.class/instance/workingCopy.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,3 @@ | ||
accessing | ||
workingCopy | ||
^ workingCopy |
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,3 @@ | ||
accessing | ||
zip: aZipArchive | ||
zip := aZipArchive |
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,3 @@ | ||
accessing | ||
zip | ||
^ zip |
19 changes: 19 additions & 0 deletions
19
src/Squot.package/SquotSarBuilder.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"class" : { | ||
"buildSarFrom:" : "mad 11/14/2023 18:28", | ||
"newWithWorkingCopy:" : "mad 11/14/2023 18:27" }, | ||
"instance" : { | ||
"addPackage:at:" : "mad 11/14/2023 19:28", | ||
"addPreambleLine:" : "mad 11/14/2023 18:46", | ||
"addVersion:at:" : "mad 11/21/2023 15:15", | ||
"addedPackages" : "mad 11/14/2023 19:05", | ||
"addedPackages:" : "mad 1/8/2024 20:33", | ||
"buildSar" : "mad 11/14/2023 18:30", | ||
"initialize" : "mad 11/14/2023 19:05", | ||
"mappers" : "mad 11/14/2023 18:35", | ||
"preamble" : "mad 11/14/2023 18:30", | ||
"preamble:" : "mad 11/14/2023 18:30", | ||
"workingCopy" : "mad 11/14/2023 18:30", | ||
"workingCopy:" : "mad 11/14/2023 18:30", | ||
"zip" : "mad 11/14/2023 18:30", | ||
"zip:" : "mad 11/14/2023 18:31" } } |
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,17 @@ | ||
{ | ||
"category" : "Squot-Mapper-Sar", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"workingCopy", | ||
"zip", | ||
"preamble", | ||
"addedPackages" ], | ||
"name" : "SquotSarBuilder", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |
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