-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
70 lines (59 loc) · 1.13 KB
/
make.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
if "%1"=="" goto default
if "%1"=="init" goto init
if "%1"=="build" goto build
if "%1"=="exe" goto exe
if "%1"=="server" goto server
if "%1"=="cli" goto cli
if "%1"=="format" goto format
if "%1"=="clean" goto clean
if "%1"=="create-virtualenv" goto create-virtualenv
if "%1"=="lock" goto lock
:default
echo make init
echo make build
echo make exe
echo make server
echo make format
echo make lock
goto :eof
:init
call :create-virtualenv
.venv\Scripts\uv pip install -r requirements.txt
goto :eof
:build
call :init
.venv\Scripts\pyinstaller --onefile src\launcher.py
echo Binary is in dist\launcher
goto :eof
:exe
call :build
dist\launcher.exe
goto :eof
:server
call :init
.venv\Scripts\python src\launcher.py
goto :eof
:cli
call :init
.venv\Scripts\python src\cli.py
goto :eof
:format
call :init
ruff format
goto :eof
:clean
if exist .venv rmdir /s /q .venv
if exist dist rmdir /s /q dist
if exist build rmdir /s /q build
goto :eof
:create-virtualenv
if not exist .venv (
python -m venv .venv
.venv\Scripts\pip install uv
)
goto :eof
:lock
call :init
.venv\Scripts\uv pip compile requirements.in -o requirements.txt
goto :eof