[squeak-dev] The Trunk: ReleaseBuilder-mt.221.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 9 13:50:13 UTC 2021


Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-mt.221.mcz

==================== Summary ====================

Name: ReleaseBuilder-mt.221
Author: mt
Time: 9 December 2021, 2:50:12.537766 pm
UUID: 49557ab7-ea9b-2947-9e3d-cc60cd3212b6
Ancestors: ReleaseBuilder-mt.218, ReleaseBuilder-ct.205, ReleaseBuilder-ct.217, ReleaseBuilder-ct.219, ReleaseBuilder-ct.220

Adds commentary. Merges some fixes from the inbox.

=============== Diff against ReleaseBuilder-mt.218 ===============

Item was changed:
  Object subclass: #ReleaseBuilder
  	instanceVariableNames: ''
  	classVariableNames: 'DeferredTask NextMajorVersion NextMinorVersion NextTask QAndA'
  	poolDictionaries: ''
  	category: 'ReleaseBuilder'!
  
+ !ReleaseBuilder commentStamp: 'mt 12/9/2021 13:32' prior: 0!
- !ReleaseBuilder commentStamp: 'mt 9/25/2019 09:30' prior: 0!
  I'm the script that prepares a trunk image for release.
  
  Just do "ReleaseBuilder doNextStep" repeatedly until the next release is done.
  
  For the final release step:
  - If you want to try it locally, change #releaseLocally to return true.
+ - Most of the code operates (read-only) on the #buildRepository, which is usually the trunk. For releases, there is a #releaseRepository, to which some package versions will be copied from trunk.
+ 
+ ***
+ 
+ We use GitHub Actions (CI) to bundle .image, .changes, .sources, and appropriate VMs. For more information, visit https://github.com/squeak-smalltalk/squeak-app. The CI scripts will update the image and eventually call:
+ 
+ ReleaseBuilder prepareEnvironment.
+ ReleaseBuilder saveAndQuit.
+ 
+ Each version's base image (and other files) for a bundle is located here: http://files.squeak.org/base/
+ 
+ For a new release's base image, see #saveAsNewRelease, which will be triggered from #step4Release via #doNextStep.!
- - Most of the code operates (read-only) on the #buildRepository, which is usually the trunk. For releases, there is a #releaseRepository, to which some package versions will be copied from trunk.!

Item was changed:
  ----- Method: ReleaseBuilder class>>addAdditionalRepositories (in category 'scripts - support') -----
  addAdditionalRepositories
  
- 	MCRepositoryGroup default addRepository: self inboxRepository.
- 
  	#(
  		'http://www.squeaksource.com/MetacelloRepository'
  		'http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/MetacelloRepository'
  			) collect: [:url |
  				MCRepositoryGroup default addRepository: (MCHttpRepository
  					location: url
  					user: 'squeak'
  					password: 'squeak')].!

Item was added:
+ ----- Method: ReleaseBuilder class>>addGlobalRepository: (in category 'scripts - support') -----
+ addGlobalRepository: anMCRepository
+ 	"Adds the given repository to all working copies in the image. Useful for generic repositories such as trunk, inbox, and treated."
+ 
+ 	MCRepositoryGroup default
+ 		addRepository: anMCRepository.
+ 	MCWorkingCopy allManagers
+ 		do: [ :each | each repositoryGroup addRepository: anMCRepository ].!

Item was changed:
  ----- Method: ReleaseBuilder class>>changesBetweenReleases (in category 'scripts - changes') -----
  changesBetweenReleases
  	
  	| repos configs result |
+ 	repos :=#(53) collect: [:ea |
- 	repos :=#(52) 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)}.
  	
+ 	configs do: [:repoToConfig | repoToConfig value updateFromRepositories]. "Update the latest map in each repository with that repository's latest package versions." 
+ 	
  	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>>cleanUp: (in category 'class initialization') -----
+ cleanUp: aggressive
+ 	"Ignore. Do not corrupt state during release preparation, which includes system-wide clean-up but must ignore the receiver."
+ !

Item was changed:
  ----- Method: ReleaseBuilder class>>fileOutChangesBetweenReleases (in category 'scripts - changes') -----
  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 forceNewFileNamed: fileNames last do: [:strm |
+ 		c withKeysSortedSafely keysAndValuesDo: [:pkg :changes |
- 		c keysAndValuesDo: [:pkg :changes |
  			strm nextPutAll: '# '; nextPutAll: pkg name; cr.
+ 			(changes withKeysSorted: #dateAndTime ascending) keysAndValuesDo: [:ver :msg |
+ 				strm
+ 					nextPutAll: '- **';
+ 					nextPutAll: ver name;
+ 					nextPutAll: ':** '.
+ 				msg lines withIndexDo: [:line :index | line ifNotEmpty: [:m |
+ 					index > 1 ifTrue: [strm nextPutAll: '  '].
+ 					strm nextPutAll: m.
+ 					strm 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]].
- 				strm nextPutAll: '------------------'; cr]]]].
  
  	self inform: 'Files written:\' withCRs, (fileNames joinSeparatedBy: String cr).!

Item was changed:
  ----- Method: ReleaseBuilder class>>requestNextReleaseVersion (in category 'manual') -----
  requestNextReleaseVersion
  	"self requestNextReleaseVersion"
  	
+ 	| nextMinor nextMajor current next |
- 	| nextMinor nextMajor current |
  	current := {
  		SystemVersion current majorVersionNumber.
  		SystemVersion current minorVersionNumber}.
  	nextMinor := {
  		current first.
  		current second + 1}.
  	nextMajor := {
  		current first + 1.
  		0}.
  
+ 	next := Project uiManager
+ 		chooseFromLabeledValues: (OrderedDictionary new
+ 			at: ('{1}.{2}' format: {nextMinor first. nextMinor second}) put: nextMinor;
+ 			at: ('{1}.{2}' format: {nextMajor first. nextMajor second}) put: nextMajor;
+ 			yourself)
+ 		title: 'Please Choose Next Version'.
+ 	next ifNil: [^ self requestNextReleaseVersion].
+ 	NextMajorVersion := next first.
+ 	NextMinorVersion := next second.!
- 	(UIManager default
- 		chooseFrom: {
- 			'{1}.{2}' format: {nextMinor first. nextMinor second}.
- 			'{1}.{2}' format: {nextMajor first. nextMajor second}}
- 		title: 'Please Choose Next Version') in: [:answer |
- 			answer ifNil: [^ self requestNextReleaseVersion].
- 			answer = 1 ifTrue: [
- 				NextMinorVersion := nextMinor second].
- 			answer = 2 ifTrue: [
- 				NextMajorVersion := nextMajor first.
- 				NextMinorVersion := 0]].!

Item was changed:
  ----- Method: ReleaseBuilder class>>saveClean (in category 'saving') -----
  saveClean
+ 	"Use this to clean up the current image and save it under a new name."
- 	"Use this to create clean up the current image and save it under a new name."
  
  	(Project uiManager
  		confirm: 'This will update and clean-up the current (!!) image,\which is then saved under the same (!!) name.\\Do you want to continue?' withCRs
  		title: 'Clean Image') == true ifFalse: [^ self].
  
  	self
  		prepareSourceCode;
  		prepareEnvironment.
  		
  	self saveAndQuit.!

Item was changed:
  ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') -----
  setPreferences
  	"Preferences class defaultValueTableForCurrentRelease"
  
  "	Preferences outOfTheBox."  "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up."
  
  	"General User interaction"
  	Preferences
  		enable: #generalizedYellowButtonMenu ;
  		enable: #swapMouseButtons;
  		disable: #mouseOverForKeyboardFocus.
  	Morph indicateKeyboardFocus: true.
  	Project uiManager openToolsAttachedToMouseCursor: false.
  	SearchBar useScratchPad: false.
  	
  	HandMorph sendMouseWheelToKeyboardFocus: false.
  	HandMorph synthesizeMouseWheelEvents: true.
  	
  	"Text input."
  	TextEditor
  		 autoEnclose: true ;
  		 autoIndent: true ;
  		 encloseSelection: false ;
  		 destructiveBackWord: false ;
  		 blinkingCursor: true ;
  		 dumbbellCursor: false.
  	PluggableTextMorph simpleFrameAdornments: false.
  	TextMorphForEditView draggableTextSelection: true.
  	
  	"Windows"
  	SystemWindow reuseWindows: false.
  	SystemWindow windowsRaiseOnClick: true.
  	SystemWindow windowTitleActiveOnFirstClick: true.
  	Model windowActiveOnFirstClick: false. "Not good for little screen real estate."
  	Model useColorfulWindows: false. 
  
  	Preferences
  		disable: #fastDragWindowForMorphic.
  	AbstractResizerMorph
  		gripThickness: 4;
  		handleLength: 25.
  	CornerGripMorph
  		drawCornerResizeHandles: false;
  		drawEdgeResizeHandles: false.
  	ProportionalSplitterMorph
  		showSplitterHandles: false;
  		smartHorizontalSplitters: false;
  		smartVerticalSplitters: false.
  
  	"Scroll bars."
  	Preferences
  		enable: #scrollBarsNarrow;
  		enable: #scrollBarsOnRight;
  		enable: #alwaysHideHScrollbar;
  		disable: #alwaysShowHScrollbar;
  		disable: #alwaysShowVScrollbar.
  	ScrollBar
  		scrollBarsWithoutArrowButtons: true;
  		scrollBarsWithoutMenuButton: true.
  	ScrollPane
  		useRetractableScrollBars: false.
  
  	"Rounded corners."
  	Morph preferredCornerRadius: 8.
  	SystemWindow roundedWindowCorners: false.
  	DialogWindow roundedDialogCorners: false.
  	MenuMorph roundedMenuCorners: false.
  	PluggableButtonMorph roundedButtonCorners: false.
  	ScrollBar roundedScrollBarLook: false.
  	
  	"Gradients."
  	SystemWindow gradientWindow: false.
  	DialogWindow gradientDialog: false.
  	MenuMorph gradientMenu: false.
  	PluggableButtonMorph gradientButton: false.
  	ScrollBar gradientScrollBar: false.
  
  	"Shadows"
  	Preferences enable: #menuAppearance3d.
  	Morph useSoftDropShadow: true.
  	
  	"Lists and Trees"
  	PluggableListMorph
  		filterableLists: true;
  		clearFilterAutomatically: false;
  		clearFilterDelay: 500;
  		highlightHoveredRow: true;
  		highlightPreSelection: false;
  		menuRequestUpdatesSelection: true.
  	PluggableTreeMorph
  		filterByLabelsOnly: false;
  		maximumSearchDepth: 1.
  	
  	"Standard Tools"
  	TheWorldMainDockingBar
  		showWorldMainDockingBar: true;
  		showSecondsInClock: true;
  		twentyFourHourClock: true.
  	SearchBar useSmartSearch: true.
  	Workspace shouldStyle: false.
  	TranscriptStream
  		forceUpdate: true;
  		redirectToStdOut: false;
  		characterLimit: 20000.
  	Browser
  		listClassesHierarchically: true;
  		showClassIcons: true;
  		showMessageIcons: true;
  		sortMessageCategoriesAlphabetically: true.
  	SystemBrowser browseWithDragNDrop: true.
  	MessageSet useUnifiedMessageLabels: true.
  	Preferences
  		enable: #annotationPanes;
  		defaultAnnotationRequests: #(timeStamp author messageCategory implementorsCount allChangeSets);
  		enable: #optionalButtons;
  		disable: #diffsWithPrettyPrint;
  		enable: #traceMessages;
  		enable: #alternativeBrowseIt;
  		enable: #menuWithIcons;
+ 		enable: #visualExplorer;
+ 		disable: #showSharedFlaps.
- 		enable: #visualExplorer.
  	Preferences disable: #debugLogTimestamp.
  
  	"Halo"
  	Preferences
  		enable: #showBoundsInHalo ;
  		disable: #alternateHandlesLook;
  		disable: #showDirectionHandles.
  	Morph
  		haloForAll: true;
  		metaMenuForAll: true.
  
  	"System"
  	NetNameResolver enableIPv6: false.
  	Scanner
  		allowUnderscoreAsAssignment: true;
  		prefAllowUnderscoreSelectors: true.
  		
  	Deprecation showDeprecationWarnings: true
  
  	"that's all, folks"!

Item was changed:
  ----- Method: ReleaseBuilder class>>step0AssureAlpha (in category 'manual - steps') -----
  step0AssureAlpha
  	"Re-open the trunk again."
  	
+ 	[self requestNextReleaseVersion.
+ 	self setNewSystemVersion: self versionStringAlpha]
+ 		ensure: [NextMajorVersion := NextMinorVersion := nil].!
- 	self requestNextReleaseVersion.
- 	self setNewSystemVersion: self versionString, 'alpha'.!

Item was changed:
  ----- Method: ReleaseBuilder class>>step4Release (in category 'manual - steps') -----
  step4Release
+ 	"Creates the release. New file, cleaned up."
- 	"Creates the release. New file, clean-ed up."
  	
  	(UIManager default
  		confirm: ('Do you want release {1}{2}?' withCRs format: {
  						self versionString.
  						(self releaseLocally ifTrue: [' locally'] ifFalse: [''])})
  		title: 'Release Builder Step 4 of 4: The Release')
  		 ifFalse: [^ self].
  	
  	"If you re-open the current trunk image again, it will be an alpha version for the next release."
  	DeferredTask := [self step0AssureAlpha].
  	
  	"We continue with preparing the release image."
  	NextTask := [self saveAsNewRelease].
  	
  	"Now save it but do not quit."
  	Smalltalk snapshot: true andQuit: false.!

Item was changed:
  ----- Method: ReleaseBuilder class>>switchToNewRepository: (in category 'scripts - support') -----
+ switchToNewRepository: anMCRepository
+ 
- switchToNewRepository: anMCRepository 
  	MCMcmUpdater defaultUpdateURL: anMCRepository description.
+ 
  	MCRepositoryGroup reset.
+ 	MCWorkingCopy allManagers
+ 		do: [ :each | each repositoryGroup: MCRepositoryGroup new ].
+ 
+ 	self
+ 		addGlobalRepository: anMCRepository;
+ 		addGlobalRepository: MCRepository inbox;
+ 		addGlobalRepository: MCRepository treated.!
- 	MCRepositoryGroup default addRepository: anMCRepository.
- 	MCWorkingCopy allManagers do:
- 		[ : each | each repositoryGroup:
- 			(MCRepositoryGroup new
- 				 addRepository: anMCRepository ;
- 				 addRepository: MCRepository inbox ;
- 				 addRepository: MCRepository treated ;
- 				 yourself) ]!

Item was changed:
+ (PackageInfo named: 'ReleaseBuilder') postscript: 'ReleaseBuilder classPool
+ 	at: #NextMajorVersion put: nil;
+ 	at: #NextMinorVersion put: nil.'!
- (PackageInfo named: 'ReleaseBuilder') postscript: '"See forum.world.st/NOTICE-Duplicate-Monticello-version-names-td5117695.html"
- MCMcmUpdater default dependentPackages do: [:package |
- 	package workingCopy repositoryGroup
- 		addRepository: MCRepository inbox;
- 		addRepository: MCRepository treated].
- '!



More information about the Squeak-dev mailing list