Skip to content

Commit

Permalink
[Fixed] Implement a version option
Browse files Browse the repository at this point in the history
Signed-off-by: amannocci <[email protected]>
  • Loading branch information
amannocci committed Aug 7, 2020
1 parent 556e210 commit 0e56c19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ before_install:
script:
- "./scripts/workflow.sh test"
- "./scripts/workflow.sh build"
- "./dist/temply"
- "./dist/temply --version"
deploy:
provider: releases
api_key:
Expand Down
3 changes: 2 additions & 1 deletion temply/temply.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import jinja2
from jinja2 import Environment, FileSystemLoader
from path import Path

from . import __version__

@click.command('temply')
@click.option('--allow-missing', help='Allow missing variables.', is_flag=True)
@click.option('-o', '--output-file', help='Output file path.', type=click.Path())
@click.version_option(f'{__version__}')
@click.argument('input_file')
def main(allow_missing, output_file, input_file):
"""Render jinja2 templates on the command line with environment variables."""
Expand Down

0 comments on commit 0e56c19

Please sign in to comment.