File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,15 @@ echo build_time: %build_time%
4747echo pwd: %cd%
4848echo sdk_url: %sdk_url%
4949
50+ REM Version validation: branch name vs install.ps1 SDK version
51+ for /f " tokens=*" %%a in ('powershell -Command " (Get-Content 'windows\APIExample\install.ps1' -Raw) -match '_v([0-9]+\.[0-9]+\.[0-9]+)' | Out-Null; $matches[1]" ') do set SDK_VER = %%a
52+ for /f " tokens=*" %%b in ('powershell -Command " '%api_examples_branch% ' -match '([0-9]+\.[0-9]+\.[0-9]+)' | Out-Null; $matches[1]" ') do set BRANCH_VER = %%b
53+ if not " %SDK_VER% " == " %BRANCH_VER% " (
54+ echo ERROR: Version mismatch - Branch: %BRANCH_VER% , install.ps1: %SDK_VER%
55+ exit /b 1
56+ )
57+ echo Version validated: %BRANCH_VER%
58+
5059REM If sdk_url has a value, replace the URL in install.ps1
5160if not " %sdk_url% " == " " (
5261 if not " %sdk_url% " == " none" (
@@ -66,7 +75,7 @@ echo compile_project: %compile_project%
6675REM Package APIExample code (only when compress_apiexample=true)
6776REM Run before compile so package content is not affected by compile
6877set result_zip = APIExample_result.zip
69- set des_path = %WORKSPACE% \Shengwang_APIExample_code_windows_ %BUILD_NUMBER% .zip
78+ set des_path = %WORKSPACE% \Agora_Native_SDK_for_Windows_v %SDK_VER% _APIExample_ %BUILD_NUMBER% .zip
7079if " %compress_apiexample% " == " true" (
7180 echo " Packaging APIExample code..."
7281
You can’t perform that action at this time.
0 commit comments