Skip to content

Commit

Permalink
add version flag to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
owlas committed Sep 9, 2021
1 parent 9fb5ce2 commit a7a6df3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 9 additions & 0 deletions dbt2looker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import logging
import pathlib
import os
try:
from importlib.metadata import version
except ImportError:
from importlib_metadata import version

import yaml
try:
Expand Down Expand Up @@ -64,6 +68,11 @@ def get_dbt_project_config(prefix: str):

def run():
argparser = argparse.ArgumentParser()
argparser.add_argument(
'--version',
action='version',
version=f'dbt2looker {version("dbt2looker")}',
)
argparser.add_argument(
'--target',
help='Path to dbt target directory containing manifest.json and catalog.json.',
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dbt2looker"
version = "0.7.2"
version = "0.7.3"
description = "Generate lookml view files from dbt models"
authors = ["oliverlaslett <[email protected]>"]
license = "MIT"
Expand All @@ -15,6 +15,7 @@ pydantic = "^1.8.1"
PyYAML = "^5.4.1"
jsonschema = "^3.2.0"
typing-extensions = "^3.10.0"
importlib-metadata = "^4.8.1"

[tool.poetry.dev-dependencies]

Expand Down

0 comments on commit a7a6df3

Please sign in to comment.