-
Notifications
You must be signed in to change notification settings - Fork 1
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 #18 from GsDevKit/dev
Fix Issue #17, refactor for improved test access and clarity
- Loading branch information
Showing
20 changed files
with
256 additions
and
148 deletions.
There are no files selected for viewing
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
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
repository/GsUpgrader-Core.package/GsUpgrader.class/class/upgradeGLASS..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,6 @@ | ||
projects | ||
upgradeGLASS: alternateConfigurationRepositoryDirectoryPath | ||
"Ensure that your image is upgraded to GLASS1.0-beta.9.3. | ||
Load GLASS configurations from alternateConfigurationRepositoryDirectoryPath" | ||
|
||
self new upgradeGLASS: alternateConfigurationRepositoryDirectoryPath |
6 changes: 6 additions & 0 deletions
6
...sitory/GsUpgrader-Core.package/GsUpgrader.class/instance/greaseConfigurationRegistered.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,6 @@ | ||
testing | ||
greaseConfigurationRegistered | ||
(self metacelloClass image | ||
configuration: [ :spec | spec name = 'Grease' ]; | ||
list) do: [ :greaseSpec | ^ true ]. | ||
^ false |
9 changes: 9 additions & 0 deletions
9
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/gsDevKitLocked.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,9 @@ | ||
testing | ||
gsDevKitLocked | ||
(self metacelloClass registry | ||
baseline: [ :spec | spec name = 'GsDevKit' ]; | ||
list) | ||
do: [ :gsDevKitSpec | | ||
gsDevKitSpec isLocked | ||
ifTrue: [ ^ true ] ]. | ||
^ false |
16 changes: 16 additions & 0 deletions
16
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/loadGrease.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,16 @@ | ||
loading | ||
loadGrease | ||
| metacello | | ||
self upgradeMetacello. | ||
metacello := self greaseLocked | ||
ifTrue: [ self metacelloClass registry ] | ||
ifFalse: [ | ||
self metacelloClass new | ||
repository: self greaseRepositoryDescription; | ||
yourself ]. | ||
metacello baseline: 'Grease'. | ||
self | ||
deploy: [ | ||
self log: 'Installing Grease'. | ||
metacello copy get. | ||
metacello copy load ] |
13 changes: 0 additions & 13 deletions
13
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/loadGreaseBaseline.st
This file was deleted.
Oops, something went wrong.
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
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
8 changes: 8 additions & 0 deletions
8
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/logPackageReport..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 @@ | ||
private | ||
logPackageReport: message | ||
| strm | | ||
strm := WriteStream on: String new. | ||
self packageReportOn: strm. | ||
Transcript | ||
cr; | ||
show: strm contents |
18 changes: 18 additions & 0 deletions
18
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/refreshGLASSConfigurations..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,18 @@ | ||
private | ||
refreshGLASSConfigurations: repository | ||
[ | ||
Gofer new | ||
repository: repository; | ||
package: 'ConfigurationOfGofer'; | ||
package: 'ConfigurationOfMetacello'; | ||
package: 'ConfigurationOfGsCore'; | ||
package: 'ConfigurationOfGoferProjectLoader'; | ||
package: 'ConfigurationOfGsMonticello'; | ||
package: 'ConfigurationOfGsOB'; | ||
package: 'ConfigurationOfGsMisc'; | ||
package: 'ConfigurationOfGsSqueakCommon'; | ||
load ] | ||
on: Warning | ||
do: [ :ex | | ||
self log: ex description. | ||
ex resume ] |
22 changes: 22 additions & 0 deletions
22
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/upgradeGLASS..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,22 @@ | ||
upgrading | ||
upgradeGLASS: alternateConfigurationRepositoryDirectoryPathOrNil | ||
"skip this step if GLASS1 is already loaded" | ||
|
||
| glassVersion originalVersion | | ||
self glass1Loaded | ||
ifTrue: [ | ||
self inform: 'GLASS1 is loaded. Skipping GLASS upgrade.'. | ||
^ self ]. | ||
self metacelloPreviewLoaded | ||
ifTrue: [ | ||
self inform: 'MetacelloPreview is loaded. Skipping GLASS upgrade.'. | ||
^ self ]. | ||
glassVersion := self projectVersion: 'ConfigurationOfGLASS'. | ||
self patchForGsDevKitIssue60. | ||
self log: 'Detected version ' , glassVersion printString , ' of GLASS'. | ||
glassVersion versionNumber < '1.0-beta.9.3' asMetacelloVersionNumber | ||
ifTrue: [ | ||
self | ||
upgradeGLASS: alternateConfigurationRepositoryDirectoryPathOrNil | ||
from: glassVersion ] | ||
ifFalse: [ self log: 'GLASS already upgraded to 1.0-beta.9.3' ] |
71 changes: 71 additions & 0 deletions
71
repository/GsUpgrader-Core.package/GsUpgrader.class/instance/upgradeGLASS.from..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,71 @@ | ||
private | ||
upgradeGLASS: alternateConfigurationRepositoryDirectoryPathOrNil from: glassVersion | ||
"skip this step if GLASS1 is already loaded" | ||
|
||
self log: 'Upgrading GLASS to 1.0-beta.9.3'. | ||
self | ||
deploy: [ | ||
| repository usingAlternate | | ||
repository := alternateConfigurationRepositoryDirectoryPathOrNil | ||
ifNotNil: [ | ||
"Note that the alternate repository must have a copy of each of the | ||
configurations listed in GsUpgrader>>refreshGLASSConfigurations:" | ||
usingAlternate := true. | ||
self | ||
log: | ||
'Using alternate repository: ' | ||
, alternateConfigurationRepositoryDirectoryPathOrNil printString. | ||
MCDirectoryRepository new | ||
directory: | ||
(ServerFileDirectory on: alternateConfigurationRepositoryDirectoryPathOrNil) ] | ||
ifNil: [ | ||
usingAlternate := false. | ||
self | ||
log: | ||
'Using default repository: http://seaside.gemtalksystems.com/ss/MetacelloRepository'. | ||
MCHttpRepository | ||
location: 'http://seaside.gemtalksystems.com/ss/MetacelloRepository' | ||
user: '' | ||
password: '' ]. | ||
Gofer new | ||
package: 'ConfigurationOfGLASS'; | ||
repository: repository; | ||
load. | ||
glassVersion versionNumber < '1.0-beta.9.2' asMetacelloVersionNumber | ||
ifTrue: [ | ||
self metacelloBootstrap10beta311Loaded | ||
ifFalse: [ self loadMetacelloBootstrap10beta311 ]. | ||
[ | ||
self refreshGLASSConfigurations: repository. | ||
((Smalltalk at: #'ConfigurationOfMetacello') project | ||
version: #'previewBootstrap') load. | ||
((Smalltalk at: #'ConfigurationOfGLASS') project | ||
version: '1.0-beta.9.2') load: #('Core' 'Monticello'). | ||
self patchForGsDevKitIssue60. "re-apply patch" | ||
((Smalltalk at: #'ConfigurationOfGLASS') project | ||
version: '1.0-beta.9.2') load ] | ||
on: (Smalltalk at: #'MetacelloSkipDirtyPackageLoad') | ||
do: [ :ex | ex resume: false ] ] | ||
ifFalse: [ | ||
"explicitly load Metacello #previewBootstrap" | ||
usingAlternate | ||
ifTrue: [ | ||
"refresh only needed if using alternate repo" | ||
self refreshGLASSConfigurations: repository ]. | ||
Gofer new | ||
url: 'http://seaside.gemtalksystems.com/ss/metacello'; | ||
package: 'ConfigurationOfMetacello'; | ||
load. | ||
((Smalltalk at: #'ConfigurationOfMetacello') project | ||
version: #'previewBootstrap') load ]. | ||
self upgradeGofer. | ||
((Smalltalk at: #'ConfigurationOfGLASS') project version: '1.0-beta.9.3') | ||
load. | ||
#('GsCore' 'GsMonticello' 'GsOB' 'GsMisc') | ||
do: [ :gsProjectName | | ||
"Patch registrations with proper repository" | ||
self metacelloClass image | ||
configuration: gsProjectName; | ||
repository: | ||
'http://seaside.gemtalksystems.com/ss/MetacelloRepository'; | ||
register ] ] |
Oops, something went wrong.