File tree Expand file tree Collapse file tree 2 files changed +10
-92
lines changed
Expand file tree Collapse file tree 2 files changed +10
-92
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def generate(self):
3737
3838 print ('Step 3/3: Building list' )
3939 versions_dict = self .parse_prestashop_versions (prestashop_data , available_php_versions )
40- branches_dict = self .previous_state_versions
40+ branches_dict = self .get_branches_and_nightly_from_existing_file ()
4141 self .write_versions_py (versions_dict | branches_dict )
4242
4343 def get_available_php_versions (self ):
@@ -49,6 +49,15 @@ def get_available_php_versions(self):
4949 available_versions .add (match .group (1 ))
5050 return available_versions
5151
52+ # Branches and nightly entries are manually added in versions.py file.
53+ # Let's reuse the existing contents on each generation.
54+ def get_branches_and_nightly_from_existing_file (self ):
55+ branches = {}
56+ for branch , php_versions in self .previous_state_versions .items ():
57+ if branch == self .NIGHTLY or branch .endswith ('x' ):
58+ branches [branch ] = (tuple (php_versions ))
59+ return branches
60+
5261 def parse_prestashop_versions (self , prestashop_json , available_php_versions ):
5362 versions = {}
5463 for entry in prestashop_json :
Original file line number Diff line number Diff line change 162162 '8.0' ,
163163 '8.1' ,
164164 ),
165- '8.0.1-classic' : (
166- '7.2' ,
167- '7.3' ,
168- '7.4' ,
169- '8.0' ,
170- '8.1' ,
171- ),
172165 '8.0.2' : (
173166 '7.2' ,
174167 '7.3' ,
175168 '7.4' ,
176169 '8.0' ,
177170 '8.1' ,
178171 ),
179- '8.0.2-classic' : (
180- '7.2' ,
181- '7.3' ,
182- '7.4' ,
183- '8.0' ,
184- '8.1' ,
185- ),
186172 '8.0.3' : (
187173 '7.2' ,
188174 '7.3' ,
197183 '8.0' ,
198184 '8.1' ,
199185 ),
200- '8.0.4-classic' : (
201- '7.2' ,
202- '7.3' ,
203- '7.4' ,
204- '8.0' ,
205- '8.1' ,
206- ),
207186 '8.0.5' : (
208187 '7.2' ,
209188 '7.3' ,
232211 '8.0' ,
233212 '8.1' ,
234213 ),
235- '8.1.0-classic' : (
236- '7.2' ,
237- '7.3' ,
238- '7.4' ,
239- '8.0' ,
240- '8.1' ,
241- ),
242214 '8.1.0-rc.1' : (
243215 '7.2' ,
244216 '7.3' ,
253225 '8.0' ,
254226 '8.1' ,
255227 ),
256- '8.1.1-classic' : (
257- '7.2' ,
258- '7.3' ,
259- '7.4' ,
260- '8.0' ,
261- '8.1' ,
262- ),
263228 '8.1.2' : (
264229 '7.2' ,
265230 '7.3' ,
266231 '7.4' ,
267232 '8.0' ,
268233 '8.1' ,
269234 ),
270- '8.1.2-classic' : (
271- '7.2' ,
272- '7.3' ,
273- '7.4' ,
274- '8.0' ,
275- '8.1' ,
276- ),
277235 '8.1.3' : (
278236 '7.2' ,
279237 '7.3' ,
280238 '7.4' ,
281239 '8.0' ,
282240 '8.1' ,
283241 ),
284- '8.1.3-classic' : (
285- '7.2' ,
286- '7.3' ,
287- '7.4' ,
288- '8.0' ,
289- '8.1' ,
290- ),
291242 '8.1.4' : (
292243 '7.2' ,
293244 '7.3' ,
294245 '7.4' ,
295246 '8.0' ,
296247 '8.1' ,
297248 ),
298- '8.1.4-classic' : (
299- '7.2' ,
300- '7.3' ,
301- '7.4' ,
302- '8.0' ,
303- '8.1' ,
304- ),
305249 '8.1.5' : (
306250 '7.2' ,
307251 '7.3' ,
308252 '7.4' ,
309253 '8.0' ,
310254 '8.1' ,
311255 ),
312- '8.1.5-classic' : (
313- '7.2' ,
314- '7.3' ,
315- '7.4' ,
316- '8.0' ,
317- '8.1' ,
318- ),
319256 '8.1.6' : (
320257 '7.2' ,
321258 '7.3' ,
322259 '7.4' ,
323260 '8.0' ,
324261 '8.1' ,
325262 ),
326- '8.1.6-classic' : (
327- '7.2' ,
328- '7.3' ,
329- '7.4' ,
330- '8.0' ,
331- '8.1' ,
332- ),
333263 '8.1.7' : (
334264 '7.2' ,
335265 '7.3' ,
336266 '7.4' ,
337267 '8.0' ,
338268 '8.1' ,
339269 ),
340- '8.1.7-classic' : (
341- '7.2' ,
342- '7.3' ,
343- '7.4' ,
344- '8.0' ,
345- '8.1' ,
346- ),
347270 '8.1.x' : (
348271 '7.2' ,
349272 '7.3' ,
358281 '8.0' ,
359282 '8.1' ,
360283 ),
361- '8.2.0-classic' : (
362- '7.2' ,
363- '7.3' ,
364- '7.4' ,
365- '8.0' ,
366- '8.1' ,
367- ),
368284 '8.2.1' : (
369285 '7.2' ,
370286 '7.3' ,
371287 '7.4' ,
372288 '8.0' ,
373289 '8.1' ,
374290 ),
375- '8.2.1-classic' : (
376- '7.2' ,
377- '7.3' ,
378- '7.4' ,
379- '8.0' ,
380- '8.1' ,
381- ),
382291 '8.2.2' : (
383292 '7.2' ,
384293 '7.3' ,
You can’t perform that action at this time.
0 commit comments