forked from Yubico/yubioath-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-helper.bat
24 lines (19 loc) · 1008 Bytes
/
build-helper.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@echo off
echo Building authenticator-helper for Windows...
cd helper
poetry install || goto :error
rmdir /s /q ..\build\windows\helper
poetry run pyinstaller authenticator-helper.spec --distpath ..\build\windows || goto :error
echo Generating license files...
rmdir /s /q ..\build\windows\helper-license-venv
poetry build || goto :error
poetry run python -m venv ..\build\windows\helper-license-venv || goto :error
..\build\windows\helper-license-venv\Scripts\python -m pip install --upgrade pip wheel || goto :error
..\build\windows\helper-license-venv\Scripts\python -m pip install dist\authenticator_helper-0.1.0-py3-none-any.whl pip-licenses || goto :error
..\build\windows\helper-license-venv\Scripts\pip-licenses --format=json --no-license-path --with-license-file --ignore-packages authenticator-helper zxing-cpp --output-file ..\assets\licenses\helper.json || goto :error
cd ..
echo All done, output in build/windows/
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%