check-dependencies.sh 1019 B

123456789101112131415161718192021
  1. # This script is used to check the latest installable requirements for each package.
  2. # It will generate a requirements.txt file without bound for each package.
  3. # Then install and dump them to check the latest installable requirements.
  4. # If the program detect a new package available, it print it on stdout.
  5. # Finally, it will generate a Pipfile with the latest version available.
  6. # Generate requirements.txt without bound.
  7. python check-dependencies.py generate-raw-requirements > raw-requirements.txt
  8. # Create a virtual environment, install dependencies, and freeze them
  9. python -m venv tmp-venv > /dev/null
  10. ./tmp-venv/bin/python3 -m pip install -r raw-requirements.txt > /dev/null
  11. ./tmp-venv/bin/python3 -m pip freeze > new-requirements.txt
  12. # Display dependencies summary.
  13. python check-dependencies.py dependencies-summary new-requirements.txt
  14. # Generate a Pipfile based on the new dependencies.
  15. python check-dependencies.py generate-pipfile $1 new-requirements.txt
  16. rm -f new-requirements.txt raw-requirements.txt