diff --git a/Makefile b/Makefile index 2bb6ac8..10f2cdf 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +SHELL:=/bin/bash install: pip3 install . @@ -18,5 +19,4 @@ clean: rm -rf build .pytest_cache dist google_drive.egg-info release: - python3 setup.py sdist bdist_wheel && \ - twine upload dist/* + ./scripts/release.sh diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..567c52a --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# +# Code based in: https://github.com/opentensor/bittensor/blob/master/scripts/release/release_pip.sh +# + +#### +# Utils +#### +source ${BASH_SOURCE%/*}/utils.sh +### + +# 1. Cleaning up +echo_info "Removing dirs: dist/ and build/" +rm -rf dist/ +rm -rf build/ + +# 2. Creating python wheel +echo_info "Generating python wheel" +python3 setup.py sdist bdist_wheel + +# 3. Upload wheel to pypi +echo_info "Uploading python wheel" +python3 -m twine upload dist/* diff --git a/scripts/utils.sh b/scripts/utils.sh new file mode 100644 index 0000000..edd9ce0 --- /dev/null +++ b/scripts/utils.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# +# Code based in: https://github.com/opentensor/bittensor/blob/master/scripts/release/utils.sh +# + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +function echo_error { + echo -e "${RED}[ERROR]${NC} $1" +} + +function echo_warning { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +function echo_info { + echo -e "${GREEN}[INFO]${NC} $1" +} \ No newline at end of file diff --git a/setup.py b/setup.py index 988e281..3934e3c 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def read_requirements(path): setup( name="google-drive", - version="0.3.3", + version="0.3.4", author="Eduardo Garcia", author_email="garciaruiz.edu+maintain+google-drive-python@gmail.com", maintainer="Eduardo GarcĂ­a",