Skip to content

Commit

Permalink
sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Oct 13, 2024
1 parent 2c5895f commit 77bcc21
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions canary.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
EXAMPLES_VERSION_FILE = "examples/VERSION"


def update_sora_version(version_content):
def update_sdk_version(version_content):
updated_content = []
sora_version_updated = False
sdk_version_updated = False
new_version = None

for line in version_content:
Expand All @@ -27,13 +27,13 @@ def update_sora_version(version_content):
new_version = f"{major_minor_patch}-canary.{canary_number + 1}"

updated_content.append(f"SORA_CPP_SDK_VERSION={new_version}")
sora_version_updated = True
sdk_version_updated = True
else:
updated_content.append(line)
else:
updated_content.append(line)

if not sora_version_updated:
if not sdk_version_updated:
raise ValueError("SORA_CPP_SDK_VERSION not found in VERSION file.")

return updated_content, new_version
Expand Down Expand Up @@ -82,13 +82,13 @@ def main():
# Read and update the VERSION file
with open(VERSION_FILE, "r") as file:
version_content = file.readlines()
updated_version_content, new_version = update_sora_version(version_content)
updated_version_content, new_version = update_sdk_version(version_content)
write_version_file(VERSION_FILE, updated_version_content, args.dry_run)

# Read and update the examples/VERSION file
with open(EXAMPLES_VERSION_FILE, "r") as file:
examples_version_content = file.readlines()
updated_examples_version_content, _ = update_sora_version(examples_version_content)
updated_examples_version_content, _ = update_sdk_version(examples_version_content)
write_version_file(EXAMPLES_VERSION_FILE, updated_examples_version_content, args.dry_run)

# Perform git operations
Expand Down

0 comments on commit 77bcc21

Please sign in to comment.