Skip to content

Commit

Permalink
change some names and logic for inital releases
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoldegrove committed Oct 16, 2024
1 parent e0857a3 commit 893477a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions glrd-create
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ def get_garden_version_for_date(date, nightly=False):
# print(f"Minor version for {date} is {major}.{minor}")
return f"{major}.{minor}"

def create_releases(releases):
"""Create stable and patch releases."""
def create_initial_releases(releases):
"""Generate initial stable and patch releases."""
release_data = []
release_data_stable = []
release_data_patch = []
Expand Down Expand Up @@ -381,8 +381,8 @@ def create_releases(releases):

return release_data_stable, release_data_patch, latest_minor_versions

def create_nightly_releases(stable_releases):
"""Generate nightly releases from the earliest stable release."""
def create_initial_nightly_releases(stable_releases):
"""Generate initial nightly releases from the earliest stable release."""
release_data = []

start_date_default = datetime(2020, 6, 9)
Expand Down Expand Up @@ -816,8 +816,6 @@ if __name__ == "__main__":
create_initial_patch = 'patch' in create_initial_list
create_initial_nightly = 'nightly' in create_initial_list

releases = get_github_releases()

# Variables to store inputs, dev/stable/patch releases and nightly releases
stable_releases = []
patch_releases = []
Expand Down Expand Up @@ -845,7 +843,8 @@ if __name__ == "__main__":
else:
# Create initial stable and patch releases if requested
if create_initial_stable or create_initial_patch:
stable_releases, patch_releases, latest_minor_versions = create_releases(releases)
github_releases = get_github_releases()
stable_releases, patch_releases, latest_minor_versions = create_initial_releases(github_releases)

# Add stdin input or file input data if provided (existing releases will be overwritten)
if args.input_stdin or args.input:
Expand All @@ -861,7 +860,7 @@ if __name__ == "__main__":
# we define stable releases in input file, therefore this has to be run past defining inputs
# Create intial nightly releases if requested (needs stable releases)
if create_initial_nightly:
nightly_releases = create_nightly_releases(stable_releases)
nightly_releases = create_initial_nightly_releases(stable_releases)

# elif args.type != '':

Expand Down

0 comments on commit 893477a

Please sign in to comment.