-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload_lib.bat
More file actions
28 lines (23 loc) · 772 Bytes
/
upload_lib.bat
File metadata and controls
28 lines (23 loc) · 772 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
@echo off
:: Change directory to the location of the batch file
cd "%~dp0"
:: Check if the 'dist' folder exists
if exist "dist" (
echo Deleting 'dist' folder...
:: The /S switch means delete all files and subfolders in 'dist'
:: The /Q switch means quiet mode (no confirmation prompt)
rmdir /s /q "dist"
echo 'dist' folder deleted successfully.
) else (
echo 'dist' folder not found. Nothing to delete.
)
:: The FOR /D command iterates over directories (folders) that match the wildcard pattern.
:: %%i is the loop variable for the directory name.
FOR /D %%i IN (*.egg-info) DO (
echo Deleting "%%i"...
rmdir /s /q "%%i"
)
:: Execute the build command.
call ".\.venv\Scripts\Activate.bat"
python -m build
python -m twine upload dist/*