Files
speckle-automate-checker/scripts/update-requirements.sh
T
Jonathon Broughton af8352933b v3
2025-06-05 14:02:44 +01:00

22 lines
559 B
Bash

#!/bin/sh
# Store the current Python environment
CURRENT_ENV=$(pip freeze)
# Remove dev dependencies
pip uninstall -y pytest pytest-cov isort flake8 ruff
# Generate production requirements
pip freeze > requirements.txt
# Reinstall dev dependencies
pip install pytest pytest-cov isort flake8 ruff
# Generate dev requirements
pip freeze > requirements-dev.txt
# Restore the original environment
pip uninstall -y pytest pytest-cov isort flake8 ruff
echo "$CURRENT_ENV" | pip install -r /dev/stdin
echo "Requirements files have been updated successfully!"