Am 11.04.2022 10:25:35 schrieb commits@source.squeak.org commits@source.squeak.org:
Marcel Taeumel uploaded a new version of VMMakerUI to project VM Maker: http://source.squeak.org/VMMaker/VMMakerUI-mt.57.mcz
==================== Summary ====================
Name: VMMakerUI-mt.57 Author: mt Time: 11 April 2022, 10:25:28.069975 am UUID: f752708f-00fc-fe4e-b082-82981358e1be Ancestors: VMMakerUI-eem.56
Updates the update dialog: - More compact badges - More compact date-and-time display of last build - Add macOS ARM builds
=============== Diff against VMMakerUI-eem.56 ===============
Item was changed: ----- Method: TheWorldMainDockingBar>>osvm_GitHubActions_statusBadgeUrl: (in category '*VMMakerUI-updater') ----- osvm_GitHubActions_statusBadgeUrl: workflowName
| id | id := workflowName encodeForHTTP. + ^ 'https://raster.shields.io/github/workflow/status/OpenSmalltalk/opensmalltalk...' - ^ 'https://raster.shields.io/github/workflow/status/OpenSmalltalk/opensmalltalk...' format: {id}!
Item was changed: ----- Method: TheWorldMainDockingBar>>osvm_GitHubActions_statusTimestamp: (in category '*VMMakerUI-updater') ----- osvm_GitHubActions_statusTimestamp: workflow "Slow. Fetch HTML page, extract first occurrence of ...
| statusPage begin end dateAndTime | statusPage := (WebClient httpGet: (self osvm_GitHubActions_statusPageUrl: workflow)) content. begin := statusPage findString: 'datetime' startingAt: 100000. "Skip the first X bytes decoration." end := statusPage findString: 'Z' startingAt: begin. dateAndTime := DateAndTime readFrom: (statusPage copyFrom: begin + 10 to: end) readStream. ^ String streamContents: [:s | dateAndTime asDate = Date today ifTrue: [s nextPutAll: 'Today' translated, ','] ifFalse: [dateAndTime asDate = Date yesterday ifTrue: [s nextPutAll: 'Yesterday' translated, ','] ifFalse: [dateAndTime printYMDOn: s]]. s space. + (dateAndTime respondsTo: #printHMOn:) + ifTrue: [dateAndTime printHMOn: s] + ifFalse: [dateAndTime printHMSOn: s] ]! - dateAndTime printHMSOn: s]!
Item was changed: ----- Method: TheWorldMainDockingBar>>updateVMMaker (in category '*VMMakerUI-updater') ----- updateVMMaker
| updater history message | updater := MCMcmUpdater updateMapNamed: 'update.oscog' repository: 'http://source.squeak.org/VMMaker'. updater lastUpdateMap ifEmpty: [ "If this is the first time that you use the updater, start at 5.mcm to avoid loading old code." updater lastUpdateMap at: updater repository put: 5].
history := updater dependentPackages collect: [:package | package name -> (package workingCopy ancestors "N.B. the first version in a package's history will have empty ancestors." ifEmpty: [nil] ifNotEmpty: [:ancestors| ancestors first])] as: OrderedDictionary.
updater doUpdate: false.
"Set update history to the packages that actually changed." updater dependentPackages do: [:package | | oldVersionInfo newVersionInfo | oldVersionInfo := history at: package name ifAbsent: []. newVersionInfo := package workingCopy ancestors first. (oldVersionInfo ifNil: [0] ifNotNil: [oldVersionInfo versionNumber]) ifTrue: [history at: package name put: {oldVersionInfo. newVersionInfo}] ifFalse: [history removeKey: package name]].
"Prepare message, including the update history and OSVM ci badges." message := String streamContents: [:s | s nextPutAll: 'VMMaker update succesful.
'. history ifEmpty: [s nextPutAll: 'All packages were already up-to-date.'] ifNotEmpty: [s nextPutAll: 'Updated packages:']. history keysAndValuesDo: [:packageName :updateInfo | s nextPutAll: ' - '. s nextPutAll: packageName; space. updateInfo isArray ifFalse: [s nextPutAll: '*removed*' translated] ifTrue: [ updateInfo first ifNil: [s nextPutAll: '*added*' translated] ifNotNil: [s print: updateInfo first versionNumber]. s nextPutAll: ' -> '. s print: updateInfo second versionNumber. s nextPutAll: '']]. s nextPutAll: ('
Url: {1} [{1}]' format: {updater repository}). s nextPutAll: ' Map: '; print: updater updateMapName.
s nextPutAll: ' '. + #('macOS (x86)' macos 'Build for macOS' + 'macOS (ARM)' 'macos-arm' 'Build for macOS (ARM)' - #('macOS' macos 'Build for macOS' 'Windows' win 'Build for Windows' 'Linux (x86)' linux 'Build for Linux (x86)' 'Linux (ARM)' 'linux-arm' 'Build for Linux (ARM)') groupsDo: [:label :workflow :workflowName | + s nextPutAll: (' {4} [{2}] {1}' - s nextPutAll: (' {1} status: {4} [{2}]' format: { label. self osvm_GitHubActions_statusPageUrl: workflow. self osvm_GitHubActions_statusBadgeUrl: workflowName. self osvm_GitHubActions_statusTimestamp: workflow})].
+ s nextPutAll: ('
Note that updated platform sources might be available, too: {1} [{1}]' format: {'https://github.com/OpenSmalltalk/opensmalltalk-vm%27%7D). - s nextPutAll: ('
NOTE THAT updated platform sources might be available, too: -> {1} [{1}]' format: {'https://github.com/OpenSmalltalk/opensmalltalk-vm%27%7D).
]. self inform: message asTextFromHtml.!