--- a/MCSMReleaseRepository.st Sat Aug 20 13:45:01 2011 +0200
+++ b/MCSMReleaseRepository.st Sat Aug 20 13:45:06 2011 +0200
@@ -23,15 +23,6 @@
^ 'SqueakMap Release'
!
-fillInTheBlankRequest
- ^ 'SqueakMap Release Repository:'
-
-!
-
-morphicConfigure
- ^ self fillInTheBlankConfigure
-!
-
package: packageString user: userString password: passString
^ self basicNew initializeWithPackage: packageString user: userString password: passString
! !
@@ -40,7 +31,7 @@
basicStoreVersion: aVersion
| url |
- url _ self uploadVersion: aVersion.
+ url := self uploadVersion: aVersion.
self releaseVersion: aVersion url: url
!
@@ -48,6 +39,7 @@
(#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ')
anySatisfy: [:code | resultString beginsWith: code ])
ifFalse: [self error: resultString].
+
!
description
@@ -55,14 +47,15 @@
!
initializeWithPackage: packageString user: userString password: passString
- packageName _ packageString.
- user _ userString.
- password _ passString.
+ packageName := packageString.
+ user := userString.
+ password := passString.
+
!
releaseVersion: aVersion url: urlString
| result |
- result _ HTTPSocket
+ result := HTTPSocket
httpPost: self squeakMapUrl, '/packagebyname/', packageName, '/newrelease'
args: {'version' -> {(aVersion info name copyAfter: $.) extractNumber asString}.
'note' -> {aVersion info message}.
@@ -70,28 +63,30 @@
user: user
passwd: password.
result contents size > 4 ifTrue: [self error: result contents]
+
!
squeakMapUrl
^ 'http://localhost:9070/sm'
+
!
stringForVersion: aVersion
| stream |
- stream _ RWBinaryOrTextStream on: String new.
+ stream := RWBinaryOrTextStream on: String new.
aVersion fileOutOn: stream.
^ stream contents
!
uploadVersion: aVersion
| result stream |
- result _ HTTPSocket
+ result := HTTPSocket
httpPut: (self stringForVersion: aVersion)
to: self squeakMapUrl, '/upload/', aVersion fileName
user: user
passwd: password.
self checkResult: result.
- stream _ result readStream.
+ stream := result readStream.
stream upToAll: 'http://'.
^ 'http://', stream upToEnd
! !
@@ -99,5 +94,13 @@
!MCSMReleaseRepository class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSMReleaseRepository.st,v 1.1 2006-11-22 13:22:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSMReleaseRepository.st,v 1.2 2011-08-20 11:45:06 cg Exp $'
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSMReleaseRepository.st,v 1.2 2011-08-20 11:45:06 cg Exp $'
+!
+
+version_SVN
+ ^ '§Id: MCSMReleaseRepository.st 5 2010-08-29 07:30:29Z vranyj1 §'
! !