Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-mt.151.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.151 Author: mt Time: 12 August 2016, 4:23:33.198343 pm UUID: f39bb7dd-f7ba-ff44-9c9f-a27d89c24359 Ancestors: ReleaseBuilder-mt.150 Simple scripts for ReleaseBuilder to generate mark down for all commit messages between releases. Should help to write release notes. Just call "ReleaseBuilder fileOutChangesBetweenReleases" to try out. =============== Diff against ReleaseBuilder-mt.150 =============== Item was changed: ----- Method: ReleaseBuilder class>>buildConfiguration (in category 'accessing') ----- buildConfiguration + ^ self lastConfigurationIn: self buildRepository map: MCMcmUpdater updateMapName! - | max versionName | - max := 0. - versionName := ''. - - (self buildRepository versionNamesForPackageNamed: MCMcmUpdater updateMapName) do: [:nm | - ((nm findTokens: $.) atLast: 2) asInteger in: [:versionNumber | - versionNumber > max ifTrue: [max := versionNumber. versionName := nm]]]. - - ^ self buildRepository versionNamed: versionName - ! Item was added: + ----- Method: ReleaseBuilder class>>changesBetween:and: (in category 'scripts - support') ----- + changesBetween: startConfiguration and: endConfiguration + + | a b d | + a := startConfiguration. + b := endConfiguration. + d := OrderedDictionary new. + + b dependencies do: [:dep | + | begin end finished started | + finished := false. started := false. + begin := a dependencies + detect: [:ea | ea package = dep package] + ifFound: [:x | x versionInfo] + ifNone: [nil]. + end := dep versionInfo. + + d at: dep package put: OrderedDictionary new. + dep package workingCopy ancestry allAncestorsDo: [:ver | + started := started or: [ver name = end name]. + finished := finished or: [begin notNil and: [ver name = begin name]]. + started & finished not ifTrue: [(d at: dep package) at: ver put: ver message]]]. + ^ d! Item was added: + ----- Method: ReleaseBuilder class>>changesBetweenReleases (in category 'scripts - support') ----- + changesBetweenReleases + + | repos configs result | + repos :=#(41 42 43 44 45 50) collect: [:ea | + (MCHttpRepository + location: 'http://source.squeak.org/squeak', ea + user: 'squeak' + password: 'squeak')]. + configs := repos collect: [:ea | ea description -> (self firstConfigurationIn: ea map: 'update')]. + configs := configs, {(self buildRepository description -> self buildConfiguration)}. + + result := OrderedDictionary new. + configs overlappingPairsDo: [:c1 :c2 | + result + at: c2 key + put: (self changesBetween: c1 value and: c2 value)]. + + ^ result + ! Item was added: + ----- Method: ReleaseBuilder class>>fileOutChangesBetweenReleases (in category 'scripts - support') ----- + fileOutChangesBetweenReleases + "Generate mark-down files with all commit messages by release. To be used to write release notes." + + | fileNames | + fileNames := OrderedCollection new. + + self changesBetweenReleases keysAndValuesDo: [:location :c | + fileNames add: ('commits-{1}.md' format: {(location findTokens: '/') last}). + FileStream fileNamed: fileNames last do: [:strm | + c keysAndValuesDo: [:pkg :changes | + strm nextPutAll: '# '; nextPutAll: pkg name; cr. + changes keysAndValuesDo: [:ver :msg | + msg linesDo: [:line | line withBlanksTrimmed ifNotEmpty: [:m | + (m first isDigit or: [{$*. $-} includes: m first]) + ifTrue: [strm nextPutAll: ' ', m] + ifFalse: [strm nextPutAll: ' - ', m]. + strm cr]]]]]]. + + self inform: 'Files written:\' withCRs, (fileNames joinSeparatedBy: String cr).! Item was added: + ----- Method: ReleaseBuilder class>>firstConfigurationIn:map: (in category 'scripts - support') ----- + firstConfigurationIn: repo map: map + + | min versionName | + min := 999999999. + versionName := ''. + + (repo versionNamesForPackageNamed: map) do: [:nm | + ((nm findTokens: $.) atLast: 2) asInteger in: [:versionNumber | + versionNumber < min ifTrue: [min := versionNumber. versionName := nm]]]. + + ^ repo versionNamed: versionName + ! Item was added: + ----- Method: ReleaseBuilder class>>lastConfigurationIn:map: (in category 'scripts - support') ----- + lastConfigurationIn: repo map: map + + | max versionName | + max := 0. + versionName := ''. + + (repo versionNamesForPackageNamed: map) do: [:nm | + ((nm findTokens: $.) atLast: 2) asInteger in: [:versionNumber | + versionNumber > max ifTrue: [max := versionNumber. versionName := nm]]]. + + ^ repo versionNamed: versionName + ! |
Free forum by Nabble | Edit this page |