Created
May 10, 2024 04:05
-
-
Save bskinn/e1e1abc67d346d368fa8de64a3666c09 to your computer and use it in GitHub Desktop.
CMD batch script convenience wrapper around pip-compile
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
@echo off | |
setlocal | |
if "%~1"=="" ( | |
echo No pip-compile targets provided. | |
exit /b 1 | |
) | |
set CUSTOM_COMPILE_COMMAND=%0 %* | |
:loop | |
if "%~1"=="" goto :end | |
set arg=%1 | |
shift | |
if "%arg%"=="dev" ( | |
pip-compile -o "requirements-dev.txt" "requirements-dev.in" | |
) else if "%arg%"=="ci" ( | |
pip-compile -o "requirements-ci.txt" "requirements-ci.in" | |
) else if "%arg%"=="flake8" ( | |
pip-compile -o "requirements-flake8.txt" "requirements-flake8.in" | |
) else if "%arg%"=="rtd" ( | |
pip-compile -o "requirements-rtd.txt" "requirements-rtd.in" | |
) else ( | |
echo Unknown argument '%arg%' | |
) | |
goto :loop | |
:end | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment