ciclopibot/update_package.sh
Davte aee0c692ef First release
Added scripts to build package and upload it on pypi
2019-07-19 10:36:40 +02:00

24 lines
777 B
Bash

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