Queer European MD passionate about IT

update_package.sh 823 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Get current directory
  3. this_script_directory=$(cd "$(dirname "$0")" && pwd)
  4. packenv="";
  5. # Python virtual environment directory: packenv variable in my_config.sh
  6. source "$this_script_directory"/my_config.sh;
  7. # Ensure the success of importing procedure
  8. if [ -z "${packenv}" ];
  9. then
  10. printf "Please set in ""my_config.sh"" the path to bot python virtual environment\n\nExample:\npackenv=""path/to/virtual/env""\n";
  11. exit;
  12. fi
  13. # Push, build and publish package to pypi.org
  14. bash "$this_script_directory"/push_to_remotes.sh;
  15. rm -rf "$this_script_directory/build";
  16. rm -rf "$this_script_directory/dist";
  17. rm -rf "$this_script_directory/davtelepot.egg-info";
  18. "$packenv"/python setup.py sdist;
  19. "$packenv"/pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz;
  20. "$packenv"/twine upload --skip-existing dist/*;