ci: add test for Windows CMD wrapper (#289)
* ci: add test for Windows CMD wrapper This test will fail until the CMD wrapper is fixed to call the native binary. * fix: Windows CMD wrapper calls native binary instead of missing index.js
This commit is contained in:
@@ -138,6 +138,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
Copy-Item cli/target/x86_64-pc-windows-msvc/release/agent-browser.exe bin/agent-browser-win32-x64.exe
|
Copy-Item cli/target/x86_64-pc-windows-msvc/release/agent-browser.exe bin/agent-browser-win32-x64.exe
|
||||||
|
|
||||||
|
- name: Test CMD wrapper works
|
||||||
|
run: |
|
||||||
|
bin\agent-browser.cmd --version
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
- name: Test agent-browser install command
|
- name: Test agent-browser install command
|
||||||
run: |
|
run: |
|
||||||
$env:PATH = "$pwd\bin;$env:PATH"
|
$env:PATH = "$pwd\bin;$env:PATH"
|
||||||
|
|||||||
+10
-2
@@ -1,5 +1,13 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
set "SCRIPT_DIR=%~dp0"
|
set "SCRIPT_DIR=%~dp0"
|
||||||
node "%SCRIPT_DIR%..\dist\index.js" %*
|
set "BINARY=%SCRIPT_DIR%agent-browser-win32-x64.exe"
|
||||||
exit /b %errorlevel%
|
|
||||||
|
if exist "%BINARY%" (
|
||||||
|
"%BINARY%" %*
|
||||||
|
exit /b %errorlevel%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Error: No binary found for win32-x64 >&2
|
||||||
|
echo Run 'npm run build:native' to build for your platform >&2
|
||||||
|
exit /b 1
|
||||||
|
|||||||
Reference in New Issue
Block a user