diff --git a/dvc/main.py b/dvc/main.py index d841df0ab..133f5d705 100644 --- a/dvc/main.py +++ b/dvc/main.py @@ -19,6 +19,7 @@ from dvc.command.import_bulk import CmdImportBulk from dvc.command.lock import CmdLock from dvc.command.test import CmdTest +VERSION = '0.8.0' def print_usage(): usage = ('', @@ -38,7 +39,7 @@ def print_usage(): print('\n'.join(usage)) def main(): - cmds = ['init', 'run', 'sync', 'repro', 'data', 'remove', 'import', 'lock', 'cloud', \ + cmds = ['--version', 'init', 'run', 'sync', 'repro', 'data', 'remove', 'import', 'lock', 'cloud', \ 'cloud', 'cloud-run', 'cloud-instance-create', 'cloud-instance-remove', 'cloud-instance-describe', \ 'test', 'test-aws', 'test-gcloud', 'test-cloud'] @@ -50,7 +51,9 @@ def main(): cmd = sys.argv[1] - if cmd == 'init': + if cmd == '--version': + print('dvc version {}'.format(VERSION)) + elif cmd == 'init': Runtime.run(CmdInit, parse_config=False) elif cmd == 'run': Runtime.run(CmdRun) diff --git a/setup.py b/setup.py index 6631c7133..061e05a4a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import platform from setuptools import setup, find_packages from distutils.errors import DistutilsPlatformError +from dvc.main import VERSION install_requires = [ 'altgraph==0.13', @@ -97,7 +98,7 @@ if platform.system() == 'Darwin': setup( name='dvc', - version='0.1', + version=VERSION, description='Git for data science projects', author='Dmitry Petrov', author_email='dmitry@dataversioncontrol.com',