Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdlib: Support old FCOS version in parsing #3995

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cosalib/cmdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ def parse_fcos_version_to_timestamp(version):
'''
Parses an FCOS build ID and verifies the versioning is accurate. Then
it verifies that the parsed timestamp has %Y%m%d format and returns that.
Also, parses older format for versions, for eg. 30.20190712.0
'''
m = re.match(r'^([0-9]{2})\.([0-9]{8})\.([0-9]+|dev)\.([0-9]+)$', version)
m = re.match(r'^([0-9]{2})\.([0-9]{8})\.([0-9]+|dev)(?:\.([0-9]+))?$', version)
if m is None:
raise Exception(f"Incorrect versioning for FCOS build {version}")
try:
Expand Down
Loading