[Pkg] The Trunk: System-mt.1248.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Nov 22 09:12:00 UTC 2021
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1248.mcz
==================== Summary ====================
Name: System-mt.1248
Author: mt
Time: 22 November 2021, 10:11:55.950785 am
UUID: 26002484-3fff-e74e-8a15-9cf025fe7395
Ancestors: System-mt.1247
Fixes CI status in update dialog.
=============== Diff against System-mt.1247 ===============
Item was added:
+ ----- Method: SystemVersion>>ciBranch (in category 'continuous integration') -----
+ ciBranch
+ "Convert the receiver into the corresponding branch name on github.com/squeak-smalltalk/squeak-app."
+
+ | branch |
+ branch := 'squeak-{1}{2}{3}' format: {
+ self isRelease ifTrue: [self majorVersionNumber] ifFalse: [''].
+ self isRelease ifTrue: ['.'] ifFalse: ['trunk'].
+ self isRelease ifTrue: [self minorVersionNumber] ifFalse: [''] }.
+
+ ^ branch!
Item was changed:
----- Method: SystemVersion>>ciStatusBadgeUrl (in category 'continuous integration') -----
ciStatusBadgeUrl
+ "shields.io needs a workflow's descriptive name, not the name of the .yml file."
-
- | branch |
- branch := 'squeak-{1}{2}{3}' format: {
- self isRelease ifTrue: [self majorVersionNumber] ifFalse: [''].
- self isRelease ifTrue: ['.'] ifFalse: ['trunk'].
- self isRelease ifTrue: [self minorVersionNumber] ifFalse: [''] }.
+ ^ 'https://raster.shields.io/github/workflow/status/squeak-smalltalk/squeak-app/{1}/{2}?style=flat&logo=github'
+ format: {self ciWorkflowName encodeForHTTP. self ciBranch}!
- ^ 'https://api.travis-ci.com/squeak-smalltalk/squeak-app.png?branch=', branch!
Item was changed:
----- Method: SystemVersion>>ciStatusPageUrl (in category 'continuous integration') -----
ciStatusPageUrl
- "In a release image, let the user see the overview of branches to choose from. I am not aware of a permanent link for a specific branch. In a trunk image, just let Travis report the state of the main branch, which is usually for trunk builds."
+ ^ 'https://github.com/squeak-smalltalk/squeak-app/actions/workflows/{1}?query=branch%3A{2}+is%3Acompleted+event%3Aschedule'
+ format: {self ciWorkflow. self ciBranch}!
- ^ 'http://travis-ci.com/squeak-smalltalk/squeak-app{1}' format: {
- self isRelease ifFalse: [''] ifTrue: ['/branches'] }!
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' ... "
+ | 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.
- | stamp " 'Mon, 05 Jul 2021 17:52:11 GMT' " dateAndTime |
- stamp := (WebClient httpGet: self ciStatusBadgeUrl) 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 added:
+ ----- Method: SystemVersion>>ciWorkflow (in category 'continuous integration') -----
+ ciWorkflow
+ "See https://github.com/squeak-smalltalk/squeak-app/tree/squeak-trunk/.github/workflows"
+
+ ^ 'bundle.yml'!
Item was added:
+ ----- Method: SystemVersion>>ciWorkflowName (in category 'continuous integration') -----
+ ciWorkflowName
+ "See 'name' in #ciWorkflow .yml file. Case sensitive."
+
+ ^ 'Bundle'!
More information about the Packages
mailing list