-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
49 lines (43 loc) · 930 Bytes
/
Copy pathbuild.bat
File metadata and controls
49 lines (43 loc) · 930 Bytes
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
@echo off
setlocal enabledelayedexpansion
if "%1"=="clean" goto clean
if "%1"=="build" goto build
if "%1"=="install" goto install
echo Usage: %0 [clean^|build^|install]
exit /b 1
:clean
echo Cleaning build files...
if exist dist rmdir /s /q dist
for /d %%d in (*.egg-info) do rmdir /s /q "%%d" 2>nul
echo Clean complete
goto end
:build
call :clean
echo Building package...
python -m build -n --sdist
if errorlevel 1 (
echo Build failed
exit /b 1
)
echo Build complete
goto end
:install
call :build
echo Installing package...
pip uninstall -y nuxt
:: Find the latest package in dist folder
for %%f in (dist\nuxt*.whl dist\nuxt*.tar.gz) do set "latest_package=%%f"
if "!latest_package!"=="" (
echo No package found in dist folder
exit /b 1
)
echo Installing: !latest_package!
pip install "!latest_package!"
if errorlevel 1 (
echo Install failed
exit /b 1
)
echo Install complete
goto end
:end
endlocal