Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Do not generate previous for preview
Browse files Browse the repository at this point in the history
  • Loading branch information
joepvd committed Jul 14, 2022
1 parent 97c3919 commit a6c63ce
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doozerlib/cli/release_gen_assembly.py
Expand Up @@ -70,9 +70,6 @@ def exit_with_error(msg):
if auto_previous and previous_list:
exit_with_error('Cannot use `--previous` and `--auto-previous` at the same time.')

if custom and (auto_previous or previous_list or in_flight):
exit_with_error("Custom release doesn't have previous list.")

assembly_type = 'standard'
if custom:
assembly_type = 'custom'
Expand All @@ -81,13 +78,17 @@ def exit_with_error(msg):
elif re.search(r'^ec\.[0-9]+$', gen_assembly_name):
assembly_type = 'preview'

if custom or assembly_type == 'preview':
if auto_previous or previous_list or in_flight:
exit_with_error("Custom release doesn't have previous list.")

# Calculate previous list
final_previous_list: Set[VersionInfo] = set()
if in_flight:
final_previous_list.add(VersionInfo.parse(in_flight))
if previous_list:
final_previous_list |= set(map(VersionInfo.parse, previous_list))
elif auto_previous and assembly_type not in ['preview', 'custom']:
elif auto_previous and assembly_type != 'custom':
# gen_assembly_name should be in the form of `fc.0`, `rc.1`, or `4.10.1`
if assembly_type == 'candidate':
major_minor = runtime.get_minor_version() # x.y
Expand Down

0 comments on commit a6c63ce

Please sign in to comment.