Skip to content

Commit e633319

Browse files
committed
validation correction
1 parent ada5be0 commit e633319

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Tools/scripts/Utils/verifyReleaseConditions.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def get_yamato_trigger_type():
2828
In other words, we can check if the job was triggered manually, by a schedule, or by a PR, etc.
2929
"""
3030
trigger_type = os.environ.get('YAMATO_TRIGGER_TYPE', 'unknown')
31+
3132
return trigger_type
3233

3334

@@ -84,7 +85,11 @@ def verifyReleaseConditions(config: ReleaseConfig):
8485
error_messages = []
8586

8687
try:
87-
if get_yamato_trigger_type() != "Manual" and not is_release_date(config.release_weekday, config.release_week_cycle, config.anchor_date):
88+
trigger_type = get_yamato_trigger_type()
89+
print(f"Yamato Trigger Type: {trigger_type}")
90+
is_manual = trigger_type in {"Manual", "AdHoc"}
91+
92+
if if not is_manual and not is_release_date(config.release_weekday, config.release_week_cycle, config.anchor_date):
8893
error_messages.append(f"Condition not met: Today is not the scheduled release day. It should be weekday: {config.release_weekday}, every {config.release_week_cycle} weeks starting from {config.anchor_date}.")
8994

9095
if is_changelog_empty(config.changelog_path):
@@ -98,7 +103,7 @@ def verifyReleaseConditions(config: ReleaseConfig):
98103
for i, msg in enumerate(error_messages, 1):
99104
print(f"{i}. {msg}")
100105
print("\nJob will not run. Exiting.")
101-
sys.exit(1)
106+
sys.exit(0)
102107

103108
except Exception as e:
104109
print("\n--- ERROR: Release Verification failed ---", file=sys.stderr)

0 commit comments

Comments
 (0)