Browse files

Issue #129 and Issue #130: clean up .travisyml and save MetacelloRele…

…aseDeployer

MetacelloReleaseDeployer implements the release script for Issue #129
  • Loading branch information...
1 parent 11572fb commit df3481ae27a452f8014d8cc2859d0709fe88e135 Dale Henrichs committed Sep 14, 2012
Showing with 223 additions and 11 deletions.
  1. +6 −11 .travis.yml
  2. +4 −0 MetacelloReleaseDeployer.package/.filetree
  3. +1 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/README.md
  4. +5 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deploy..st
  5. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deploy.from..st
  6. +6 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deploy.from.to..st
  7. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deployLocations.st
  8. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deployRepositories.st
  9. +5 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/release..st
  10. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/release.from..st
  11. +10 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/release.from.to..st
  12. +4 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/releaseLocations.st
  13. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/releaseRepositories.st
  14. +13 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/repositories..st
  15. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/sourceRepository.st
  16. +5 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testDeploy..st
  17. +5 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testDeployRepositories.st
  18. +5 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testRelease..st
  19. +3 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testReleaseRepositories.st
  20. +33 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/instance/deployVersion.from.to..st
  21. +18 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/instance/extractFileNamesFrom..st
  22. +39 −0 ...eleaseDeployer.package/MetacelloReleaseDeployer.class/instance/releaseProject.version.from.to..st
  23. +22 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/methodProperties.json
  24. +16 −0 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/properties.json
  25. +1 −0 MetacelloReleaseDeployer.package/monticello.meta/categories.st
  26. 0 MetacelloReleaseDeployer.package/monticello.meta/initializers.st
  27. +1 −0 MetacelloReleaseDeployer.package/monticello.meta/package
  28. +1 −0 MetacelloReleaseDeployer.package/monticello.meta/version
  29. +2 −0 MetacelloReleaseDeployer.package/properties.json
  30. 0 ReleaseProcess.md
View
17 .travis.yml
@@ -25,15 +25,10 @@ install:
script:
# - echo "running: $PROJECT_HOME/tests/$TRAVIS_SCRIPT"
- - ./build.sh -i $ST -s latAmMirror.st -m -f "$PROJECT_HOME/tests/$TRAVIS_SCRIPT" -o travisCI
+ - ./build.sh -i $ST -X -f "$PROJECT_HOME/tests/$TRAVIS_SCRIPT" -o travisCI
- cd "${BUILD_PATH}/travisCI/"
- - if ( test -e PharoDebug.log ); then cat TravisTranscript.txt; fi
- - if ( test -e PharoDebug.log ); then cat PharoDebug.log; fi
- - if ( test -e PharoDebug.log ); then die; fi
- - if ( test -e SqueakDebug.log ); then cat TravisTranscript.txt; fi
- - if ( test -e SqueakDebug.log ); then cat SqueakDebug.log; fi
- - if ( test -e SqueakDebug.log ); then die; fi
- - if ( test -e TravisCISuccess.txt ); then cat TravisCISuccess.txt; fi
- - if ( test -e TravisCIFailure.txt ); then cat TravisTranscript.txt; fi
- - if ( test -e TravisCIFailure.txt ); then cat TravisCIFailure.txt; fi
- - if ( test -e TravisCIFailure.txt ); then die; fi
+ - ls -altr *
+ - $BUILDER_CI_HOME/buildImageErrorCheck.sh
+# - cat TravisTranscript.txt
+ - $BUILDER_CI_HOME/buildTravisStatusCheck.sh
+
View
4 MetacelloReleaseDeployer.package/.filetree
@@ -0,0 +1,4 @@
+{
+ "noMethodMetaData" : true,
+ "separateMethodMetaAndSource" : false,
+ "useCypressPropertiesFile" : true }
View
1 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/README.md
@@ -0,0 +1 @@
+MetacelloReleaseDeployer is intended for use in deploying the pre 1.0-beta.32 releases of Metacello ... the releases where all the mcz file must be in the gemsource and squeaksource repositories
View
5 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deploy..st
@@ -0,0 +1,5 @@
+deploy
+deploy: aVersionString
+ "self deploy: '1.0-beta.31.1.5'"
+
+ ^ self deploy: aVersionString from: self sourceRepository
View
3 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deploy.from..st
@@ -0,0 +1,3 @@
+deploy
+deploy: aVersionString from: sourceRepository
+ ^ self deploy: aVersionString from: sourceRepository to: self deployRepositories
View
6 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deploy.from.to..st
@@ -0,0 +1,6 @@
+deploy
+deploy: aVersionString from: sourceRepository to: targetRepositories
+ ^ self new
+ deployVersion: (ConfigurationOfMetacello project version: aVersionString)
+ from: sourceRepository
+ to: targetRepositories
View
3 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deployLocations.st
@@ -0,0 +1,3 @@
+defaults
+deployLocations
+ ^ #('http://www.squeaksource.com/metacello' 'http://seaside.gemstone.com/ss/metacello')
View
3 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/deployRepositories.st
@@ -0,0 +1,3 @@
+defaults
+deployRepositories
+ ^ self repositories: self deployLocations
View
5 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/release..st
@@ -0,0 +1,5 @@
+deploy
+release: aVersionString
+ "self release '1.0-beta.31.1.5'"
+
+ ^ self release: aVersionString from: self sourceRepository
View
3 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/release.from..st
@@ -0,0 +1,3 @@
+deploy
+release: aVersionString from: sourceRepository
+ ^ self release: aVersionString from: sourceRepository to: self releaseRepositories
View
10 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/release.from.to..st
@@ -0,0 +1,10 @@
+deploy
+release: aVersionString from: sourceRepository to: targetRepositories
+ | project |
+ project := ConfigurationOfMetacello project.
+ self new
+ deployVersion: (project version: aVersionString) from: sourceRepository to: targetRepositories;
+ releaseProject: project
+ version: aVersionString
+ from: sourceRepository
+ to: targetRepositories
View
4 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/releaseLocations.st
@@ -0,0 +1,4 @@
+defaults
+releaseLocations
+ ^ self deployLocations
+ , #('http://www.squeaksource.com/MetacelloRepository' 'http://seaside.gemstone.com/ss/MetacelloRepository')
View
3 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/releaseRepositories.st
@@ -0,0 +1,3 @@
+defaults
+releaseRepositories
+ ^ self repositories: self releaseLocations
View
13 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/repositories..st
@@ -0,0 +1,13 @@
+defaults
+repositories: locationList
+ | repos |
+ repos := locationList
+ collect: [ :location |
+ | repo |
+ repo := MCHttpRepository location: location user: '' password: ''.
+ MCRepositoryGroup default repositories detect: [ :each | each = repo ] ].
+ repos
+ do: [ :each |
+ (each user isEmpty and: [ each password isEmpty ])
+ ifTrue: [ self error: 'Empty username/password for ' , each description printString ] ].
+ ^ repos
View
3 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/sourceRepository.st
@@ -0,0 +1,3 @@
+defaults
+sourceRepository
+ ^ MCFileTreeRepository new directory: (FileDirectory on: '/opt/git/1.0-beta.31/metacello-work/repository')
View
5 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testDeploy..st
@@ -0,0 +1,5 @@
+testing
+testDeploy: aVersionString
+ "self testDeploy: '1.0-beta.31.1.5'"
+
+ ^ self deploy: aVersionString from: self sourceRepository to: self testDeployRepositories inspect
View
5 ...lloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testDeployRepositories.st
@@ -0,0 +1,5 @@
+testing
+testDeployRepositories
+ ^ {(MCDictionaryRepository new
+ dictionary: Dictionary new;
+ yourself)}
View
5 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testRelease..st
@@ -0,0 +1,5 @@
+testing
+testRelease: aVersionString
+ "self testRelease: '1.0-beta.31.1.5'"
+
+ ^ self release: aVersionString from: self sourceRepository to: self testReleaseRepositories inspect
View
3 ...loReleaseDeployer.package/MetacelloReleaseDeployer.class/class/testReleaseRepositories.st
@@ -0,0 +1,3 @@
+testing
+testReleaseRepositories
+ ^ self testDeployRepositories
View
33 ...ReleaseDeployer.package/MetacelloReleaseDeployer.class/instance/deployVersion.from.to..st
@@ -0,0 +1,33 @@
+deploy
+deployVersion: version from: sourceRepository to: targetRepositories
+ | fileNames gofer targetRepository |
+ fileNames := self extractFileNamesFrom: version.
+ gofer := Gofer new.
+ gofer repository: sourceRepository.
+ Transcript
+ cr;
+ show: 'Fetching version: ' , version versionString printString.
+ fileNames
+ do: [ :fileName |
+ Transcript
+ cr;
+ tab;
+ show: fileName.
+ gofer version: fileName ].
+ gofer fetch.
+ gofer := Gofer new.
+ targetRepositories do: [ :repo | gofer repository: repo ].
+ Transcript
+ cr;
+ show: 'Pushing:'.
+ fileNames
+ do: [ :fileName |
+ Transcript
+ cr;
+ tab;
+ show: fileName.
+ gofer version: fileName ].
+ gofer push.
+ Transcript
+ cr;
+ show: 'DONE'
View
18 ...oReleaseDeployer.package/MetacelloReleaseDeployer.class/instance/extractFileNamesFrom..st
@@ -0,0 +1,18 @@
+deploy
+extractFileNamesFrom: version
+ | fileNames |
+ fileNames := Set new.
+ [
+ (MetacelloToolBox configurationNamed: 'Metacello')
+ methodSectionsFrom: version versionString
+ do: [ :methodSection |
+ methodSection versionSpec
+ specListProjectDo: [ :spec | ]
+ packageDo: [ :spec |
+ spec getFile ~~ nil
+ ifTrue: [ fileNames add: spec file ] ]
+ groupDo: [ :spec | ].
+ false ] ]
+ on: MetacelloCannotUpdateReleasedVersionError
+ do: [ :ex | ex resume ].
+ ^ fileNames
View
39 ...ployer.package/MetacelloReleaseDeployer.class/instance/releaseProject.version.from.to..st
@@ -0,0 +1,39 @@
+deploy
+releaseProject: project version: versionString from: sourceRepository to: targetRepositories
+ | configurationPackageName gofer targetRepository fileName issues version |
+ configurationPackageName := project class name asString.
+ Transcript
+ cr;
+ show: 'Validating configuration: ' , configurationPackageName printString.
+ (issues := MetacelloToolBox validateProject: project version: versionString) isEmpty
+ ifFalse: [ self error: 'configuration validation issues' ].
+ project projectPackage workingCopy modified
+ ifTrue: [ self error: 'Configuration is dirty in the image' ].
+ version := project version: versionString.
+ project stableVersion = version
+ ifFalse: [ self error: 'Release version not declared as stable: ' , project stableVersion versionString printString ].
+ (version importedVersions includes: project bleedingEdge versionString)
+ ifFalse: [
+ self
+ error:
+ 'Incorrect bleeding edge version: ' , project bleedingEdge versionString printString , ' should be '
+ , version importedVersions first printString ].
+ version blessing == #'release'
+ ifFalse: [ self error: 'Blessing is not release: ' , version blessing printString ].
+ gofer := Gofer new.
+ gofer repository: sourceRepository.
+ Transcript
+ cr;
+ show: 'Fetching....'.
+ gofer package: configurationPackageName.
+ gofer fetch.
+ gofer := Gofer new.
+ targetRepositories do: [ :repo | gofer repository: repo ].
+ Transcript
+ cr;
+ show: 'Pushing....'.
+ gofer version: project projectPackage file.
+ gofer push.
+ Transcript
+ cr;
+ show: 'DONE' P
View
22 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/methodProperties.json
@@ -0,0 +1,22 @@
+{
+ "class" : {
+ "deploy:" : "dkh 9/14/2012 15:02",
+ "deploy:from:" : "dkh 9/14/2012 15:29",
+ "deploy:from:to:" : "dkh 9/14/2012 14:52",
+ "deployLocations" : "dkh 9/14/2012 15:31",
+ "deployRepositories" : "dkh 9/14/2012 15:32",
+ "release:" : "dkh 9/14/2012 15:12",
+ "release:from:" : "dkh 9/14/2012 15:30",
+ "release:from:to:" : "dkh 9/14/2012 15:43",
+ "releaseLocations" : "dkh 9/14/2012 15:34",
+ "releaseRepositories" : "dkh 9/14/2012 15:32",
+ "repositories:" : "dkh 9/14/2012 15:32",
+ "sourceRepository" : "dkh 9/14/2012 14:42",
+ "testDeploy:" : "dkh 9/14/2012 15:35",
+ "testDeployRepositories" : "dkh 9/14/2012 15:29",
+ "testRelease:" : "dkh 9/14/2012 15:35",
+ "testReleaseRepositories" : "dkh 9/14/2012 15:30" },
+ "instance" : {
+ "deployVersion:from:to:" : "dkh 9/14/2012 15:09",
+ "extractFileNamesFrom:" : "dkh 9/14/2012 15:11",
+ "releaseProject:version:from:to:" : "dkh 9/14/2012 16:00" } }
View
16 MetacelloReleaseDeployer.package/MetacelloReleaseDeployer.class/properties.json
@@ -0,0 +1,16 @@
+{
+ "category" : "MetacelloReleaseDeployer",
+ "classinstvars" : [
+ ],
+ "classtraitcomposition" : "{}",
+ "classvars" : [
+ ],
+ "commentStamp" : "dkh 9/14/2012 16:33",
+ "instvars" : [
+ ],
+ "name" : "MetacelloReleaseDeployer",
+ "pools" : [
+ ],
+ "super" : "Object",
+ "traitcomposition" : "{}",
+ "type" : "normal" }
View
1 MetacelloReleaseDeployer.package/monticello.meta/categories.st
@@ -0,0 +1 @@
+SystemOrganization addCategory: #MetacelloReleaseDeployer!
View
0 MetacelloReleaseDeployer.package/monticello.meta/initializers.st
No changes.
View
1 MetacelloReleaseDeployer.package/monticello.meta/package
@@ -0,0 +1 @@
+(name 'MetacelloReleaseDeployer')
View
1 MetacelloReleaseDeployer.package/monticello.meta/version
@@ -0,0 +1 @@
+(name 'MetacelloReleaseDeployer-dkh.1' message 'Issue #129: deployer script implementation ... committed to configuration branch' id '08000000-1508-b609-1508-b60914000000' date '14 September 2012' time '4:43:05 pm' author 'dkh' ancestors () stepChildren ())
View
2 MetacelloReleaseDeployer.package/properties.json
@@ -0,0 +1,2 @@
+{
+ }
View
0 ReleaseProcess.md
No changes.

0 comments on commit df3481a

Please sign in to comment.