[squeak-dev] The Trunk: System-ct.1258.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Nov 27 21:13:15 UTC 2021
Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1258.mcz
==================== Summary ====================
Name: System-ct.1258
Author: ct
Time: 27 November 2021, 10:12:41.787227 pm
UUID: 12ec7795-2256-144c-92c1-c8c412a4539e
Ancestors: System-ct.1257
Robustizes CI status badge query against server errors.
For a current example, see: https://www.githubstatus.com/incidents/r5qrpp2f5fc0
=============== Diff against System-ct.1257 ===============
Item was changed:
----- Method: SystemVersion>>ciStatusTimestamp (in category 'continuous integration') -----
ciStatusTimestamp
"Slow. Fetch HTML page, extract first occurrence of
... <time-ago datetime='2021-08-04T14:24:20Z' ... "
+ | statusResponse statusPage begin end dateAndTime |
+ statusResponse := WebClient httpGet: self ciStatusPageUrl.
+ statusResponse isSuccess ifFalse: [^ nil].
+ statusPage := statusResponse content.
- | statusPage begin end dateAndTime |
- statusPage := (WebClient httpGet: self ciStatusPageUrl) 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 printHMSOn: s]!
More information about the Squeak-dev
mailing list
|