[Vm-dev] VM Maker: VMMakerUI-mt.39.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Jul 6 16:32:07 UTC 2021


Am 06.07.2021 18:28:57 schrieb commits at source.squeak.org <commits at source.squeak.org>:

Marcel Taeumel uploaded a new version of VMMakerUI to project VM Maker:
http://source.squeak.org/VMMaker/VMMakerUI-mt.39.mcz

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

Name: VMMakerUI-mt.39
Author: mt
Time: 6 July 2021, 6:28:49.096706 pm
UUID: 7957bd9a-fdbe-964b-8972-d4a4c3579eb4
Ancestors: VMMakerUI-mt.38

Adds more information to the update dialog. It now looks similar to the one for Squeak itself.

=============== Diff against VMMakerUI-mt.38 ===============

Item was added:
+ ----- Method: TheWorldMainDockingBar>>osvm_AppVeyor_statusBadgeUrl (in category '*VMMakerUI-updater') -----
+ osvm_AppVeyor_statusBadgeUrl
+
+ ^ 'https://ci.appveyor.com/api/projects/status/ecrpcrqt844n8lkm/branch/Cog'!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>osvm_AppVeyor_statusPageUrl (in category '*VMMakerUI-updater') -----
+ osvm_AppVeyor_statusPageUrl
+
+ ^ 'https://ci.appveyor.com/project/OpenSmalltalk/vm/branch/Cog'!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>osvm_AppVeyor_statusTimestamp (in category '*VMMakerUI-updater') -----
+ osvm_AppVeyor_statusTimestamp
+
+ | url stamp dateAndTime |
+ url := 'https://ci.appveyor.com/api/projects/OpenSmalltalk/vm/branch/Cog'.
+ stamp := ((WebUtils jsonDecode: (WebClient httpGet: url) content readStream) at: 'build') at: 'finished'.
+ stamp ifEmpty: [^ stamp].
+ dateAndTime := DateAndTime readFrom: stamp 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 printHMSOn: s]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>osvm_TravisCI_statusBadgeUrl (in category '*VMMakerUI-updater') -----
+ osvm_TravisCI_statusBadgeUrl
+
+ ^ 'https://api.travis-ci.com/OpenSmalltalk/opensmalltalk-vm.png?branch=Cog'!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>osvm_TravisCI_statusPageUrl (in category '*VMMakerUI-updater') -----
+ osvm_TravisCI_statusPageUrl
+
+ ^ 'https://travis-ci.com/OpenSmalltalk/opensmalltalk-vm'!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>osvm_TravisCI_statusTimestamp (in category '*VMMakerUI-updater') -----
+ osvm_TravisCI_statusTimestamp
+
+ | stamp " 'Mon, 05 Jul 2021 17:52:11 GMT' " dateAndTime |
+ stamp := (WebClient httpGet: self osvm_TravisCI_statusBadgeUrl) headerAt: 'last-modified'.
+ stamp ifEmpty: [^ stamp].
+ dateAndTime := DateAndTime readFrom: (((stamp allButFirst: 4) allButLast: 4), ' Z') 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 printHMSOn: s]!

Item was changed:
----- Method: TheWorldMainDockingBar>>updateVMMaker (in category '*VMMakerUI-updater') -----
updateVMMaker


+ | updater history message |
- | updater |
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 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: [:v | v 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 succesfully.

'.
+ 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: ('

TravisCI status: {3} [{1}]'
+ format: {
+ self osvm_TravisCI_statusPageUrl.
+ self osvm_TravisCI_statusBadgeUrl.
+ self osvm_TravisCI_statusTimestamp}).
+ s nextPutAll: ('
AppVeyor status: {3} [{1}]'
+ format: {
+ self osvm_AppVeyor_statusPageUrl.
+ self osvm_AppVeyor_statusBadgeUrl.
+ self osvm_AppVeyor_statusTimestamp}).
+
+ s nextPutAll: ('

NOTE THAT updated platform sources might be available, too:
-> {1} [{1}]' format: {'https://github.com/OpenSmalltalk/opensmalltalk-vm'}).
+
+ ].
+ self inform: message asTextFromHtml.!
- updater doUpdate: true.!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210706/36994345/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 44961 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210706/36994345/attachment-0001.png>


More information about the Vm-dev mailing list