From 65b5565cd387e0cdcfa12d2e080db9c2c92f3b0b Mon Sep 17 00:00:00 2001 From: Deven96 Date: Fri, 14 Dec 2018 06:56:51 +0100 Subject: [PATCH] updated readme --- README.md | 5 +++-- setup.py | 27 +++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 446938c..2fcb74f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # GdDownloader -[![CircleCI](https://circleci.com/gh/deven96/drive_downloader.svg?style=svg)](https://circleci.com/gh/deven96/drive_downloader) - Package to download files from google drive given shared link +[![CircleCI](https://circleci.com/gh/deven96/drive_downloader.svg?style=shield)](https://circleci.com/gh/deven96/drive_downloader) + + ## Installation ```bash diff --git a/setup.py b/setup.py index 6c82286..6d6f012 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import os import sys import setuptools +from setuptools.command.install import install CURRENT_DIR = os.getcwd() REQUIREMENTS = 'requirements.txt' @@ -8,10 +9,28 @@ with open("README.md", "r") as fh: long_description = fh.read() +VERSION = "0.0.1" + +# ensure that once a tag is created, on master, it is pushed to pypi +class VerifyVersionCommand(install): + """Custom command to verify that the git tag matches our version""" + description = 'verify that the git tag matches our version' + + def run(self): + tag = os.getenv('GDD_TAG') + + if tag != VERSION: + info = "Git tag: {0} does not match the version of this app: {1}".format( + tag, VERSION + ) + sys.exit(info) + + + setuptools.setup( name="GdDownloader", - version="0.0.1", + version=VERSION, author='Domnan Diretnan, Mmadu Manasseh', author_email="diretnandomnan@gmail.com", description="easy wrapper for downloading google drive files using only shareable link", @@ -21,6 +40,7 @@ long_description=long_description, long_description_content_type="text/markdown", license="MIT", + keywords='downloader googledrive gdrive drive', classifiers=( "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", @@ -29,5 +49,8 @@ package_data={ '': ['*.*'], }, - include_package_data=True + include_package_data=True, + cmdclass={ + 'verify': VerifyVersionCommand, + } ) \ No newline at end of file