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: |
|
||||
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
|
||||
run: |
|
||||
$env:PATH = "$pwd\bin;$env:PATH"
|
||||
|
||||
+10
-2
@@ -1,5 +1,13 @@
|
||||
@echo off
|
||||
setlocal
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
node "%SCRIPT_DIR%..\dist\index.js" %*
|
||||
exit /b %errorlevel%
|
||||
set "BINARY=%SCRIPT_DIR%agent-browser-win32-x64.exe"
|
||||
|
||||
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