Skip to content

Commit

Permalink
Merge pull request #155 from spectacles-ci/feature/version
Browse files Browse the repository at this point in the history
Add command to print version
  • Loading branch information
joshtemple authored Jan 25, 2020
2 parents d75ad77 + 29ae619 commit 4911db0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pathlib import Path
from setuptools import setup, find_packages

__version__ = "0.1.1"
from spectacles import __version__

here = Path(__file__).parent.resolve()

Expand Down
1 change: 1 addition & 0 deletions spectacles/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1.1"
2 changes: 2 additions & 0 deletions spectacles/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import logging
import os
from typing import Callable
from spectacles import __version__
from spectacles.runner import Runner
from spectacles.client import LookerClient
from spectacles.exceptions import SpectaclesException, ValidationError
Expand Down Expand Up @@ -223,6 +224,7 @@ def create_parser() -> argparse.ArgumentParser:
"""
parser = argparse.ArgumentParser(prog="spectacles")
parser.add_argument("--version", action="version", version=__version__)
subparser_action = parser.add_subparsers(
title="Available sub-commands", dest="command"
)
Expand Down

0 comments on commit 4911db0

Please sign in to comment.