Commit 3a7f825d authored by Ben Couturier's avatar Ben Couturier
Browse files

Use enumerate

parent 240edec3
Pipeline #2449546 passed with stages
in 1 minute and 31 seconds
......@@ -77,8 +77,9 @@ def list_stacks_to_release(stack_paths, siteroot):
# 2. Iterate to generate the stack in the exported format
tobuild = []
for stack in inc_stacks:
stack_number = 0
for stack_number, (platform, project_list) in enumerate(sorted(stack.builds_to_do())):
for stack_number, (platform, project_list) in enumerate(
sorted(stack.builds_to_do()), 1
# First checking if another build has the same projects exactly
# Then add platform to it instead of creating a new build
# The sort is to have a stable order in order to keep the stack
......@@ -98,7 +99,6 @@ def list_stacks_to_release(stack_paths, siteroot):
# In this file for the nightlies we list the whole stack config
# and the one already done (so the complement of the info we have)
data = dict()
stack_number += 1
data["build_tool"] = stack.build_tool()
data["platforms"] = [platform]
data["projects"] = stack.projects(with_toolchain=True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment