Fix the template groups for Pharo 7. One can now give a filter pattern/regex per version group.
pharo70
^ self
name: 'Pharo 7.0 (development version)'
url: 'http://files.pharo.org/image/70/' asZnUrl
filterPattern: 'href="(Pharo-7.0.0-alpha.build.[^"]*.zip)"'
ADD
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/class/defaultFilterPattern.st
+defaults
+defaultFilterPattern
+ "Returns the default filter pattern (Pharo6). The parenthesis here are important because this is what we want to extract for each match. The #subexpression must correspond to the index of this pair of parenthesis"
+ ^'href="([^"]*.zip)"'
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/class/name.url.filterPattern..st
+instance creation
+name: aString url: anUrl filterPattern: aPatternString
+ ^ self new
+ setName: aString url: anUrl filterPattern: aPatternString;
+ yourself
\ No newline at end of file

MODIFY
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/class/pharo70.st
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/class/pharo70.st
instance creation
pharo70
- ^ self name: 'Pharo 7.0 (development version)' url: 'http://files.pharo.org/image/70/' asZnUrl
\ No newline at end of file
+ ^ self
+ name: 'Pharo 7.0 (development version)'
+ url: 'http://files.pharo.org/image/70/' asZnUrl
+ filterPattern: 'href="(Pharo-7.0.0-alpha.build.[^"]*.zip)"'
\ No newline at end of file

DELETE
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/class/regex.st
-accessing
-regex
- "Cache the regex tree so that we don't recompute it all the time"
- ^ Regex ifNil: [ Regex := RxParser parse: 'href="([^"]*.zip)"' "the parenthesis here are important because this is what we want to extract for each match. The #subexpression must correspond to the index of this pair of parenthesis."]
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/class/regexCache.st
+accessing
+regexCache
+ "Cache the regex per version so that we don't recompute it all the time"
+ ^ RegexCache ifNil: [ RegexCache := Dictionary new ]
\ No newline at end of file

MODIFY
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/instance/regex.st
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/instance/regex.st
accessing
regex
- ^ self class regex
\ No newline at end of file
+ ^ self class regexCache at: self name asSymbol
\ No newline at end of file

MODIFY
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/instance/setName.url..st
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/instance/setName.url..st
initialize-release
setName: aName url: anUrl
name := aName.
- url := anUrl
\ No newline at end of file
+ url := anUrl.
+ self class regexCache at: aName asSymbol put: (RxParser parse: self class defaultFilterPattern)
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/instance/setName.url.filterPattern..st
+initialize-release
+setName: aName url: anUrl filterPattern: aPatternString
+ name := aName.
+ url := anUrl.
+ self class regexCache at: aName asSymbol put: (RxParser parse: aPatternString)
\ No newline at end of file

MODIFY
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/properties.json
src/PharoLauncher-Core.package/PhLHTTPListingTemplateGroup.class/properties.json
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [
- "Regex"
+ "RegexCache"
],
"instvars" : [
"url",

Fix the template groups for Pharo 7. One can now give a filter pattern/regex per version group.

pharo70
	^ self 
		name: 'Pharo 7.0 (development version)' 
		url: 'http://files.pharo.org/image/70/' asZnUrl
		filterPattern: 'href="(Pharo-7.0.0-alpha.build.[^"]*.zip)"'