Queer European MD passionate about IT

update_package.sh 777 B

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