-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version of runBearer script that works on Windows.
- Loading branch information
1 parent
b25801a
commit 00931b7
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@echo off | ||
REM Check for install/updates at https://github.com/bearer/bearer | ||
|
||
where docker >nul 2>nul | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
@echo docker required. Please install. | ||
exit /b | ||
) | ||
|
||
where sh >nul 2>nul | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
@echo git bash is required. Please install. | ||
exit /b | ||
) | ||
|
||
docker pull bearer/bearer | ||
|
||
for /f %%i in ('sh scripts/getBenchmarkVersion.sh') do set benchmark_version=%%i | ||
for /f %%i in ('docker run bearer/bearer bearer --version ^| grep -o "[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"') do set bearer_version=%%i | ||
set result_file="/src/results/Benchmark_%benchmark_version%-Bearer-v%bearer_version%.json" | ||
set current_dir=%cd% | ||
|
||
@echo on | ||
docker run --rm -v "%current_dir%:/src" bearer/bearer scan /src/src/main/ --format jsonv2 --output %result_file% |