Skip to content

Commit

Permalink
バージョンチェックの仕組みを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Sep 25, 2024
1 parent eef43cb commit 524f481
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
- @melpon
- [ADD] Ubuntu 24.04 armv8 に対応する
- @melpon
- [ADD] VERSION と examples/VERSION のバージョンをチェックする仕組みを追加
- @melpon
- [FIX] HTTP Proxy 利用時の Websocket 初期化で insecure_ メンバ変数が初期化されていなかったのを修正
- @melpon

Expand Down
25 changes: 25 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,29 @@ def install_deps(
install_catch2(**install_catch2_args)


def check_version_file():
version = read_version_file(os.path.join(BASE_DIR, "VERSION"))
example_version = read_version_file(os.path.join(BASE_DIR, "examples", "VERSION"))
has_error = False
if version["SORA_CPP_SDK_VERSION"] != example_version["SORA_CPP_SDK_VERSION"]:
logging.error(
f"SORA_CPP_SDK_VERSION mismatch: VERSION={version['SORA_CPP_SDK_VERSION']}, example/VERSION={example_version['SORA_CPP_SDK_VERSION']}"
)
has_error = True
if version["WEBRTC_BUILD_VERSION"] != example_version["WEBRTC_BUILD_VERSION"]:
logging.error(
f"WEBRTC_BUILD_VERSION mismatch: VERSION={version['WEBRTC_BUILD_VERSION']}, example/VERSION={example_version['WEBRTC_BUILD_VERSION']}"
)
has_error = True
if version["BOOST_VERSION"] != example_version["BOOST_VERSION"]:
logging.error(
f"BOOST_VERSION mismatch: VERSION={version['BOOST_VERSION']}, example/VERSION={example_version['BOOST_VERSION']}"
)
has_error = True
if has_error:
raise Exception("VERSION mismatch")


AVAILABLE_TARGETS = [
"windows_x86_64",
"macos_x86_64",
Expand All @@ -518,6 +541,8 @@ def install_deps(


def main():
check_version_file()

parser = argparse.ArgumentParser()
parser.add_argument("target", choices=AVAILABLE_TARGETS)
parser.add_argument("--debug", action="store_true")
Expand Down

0 comments on commit 524f481

Please sign in to comment.