Skip to content
Snippets Groups Projects
Commit 8a09b31d authored by Chris Holdgraf's avatar Chris Holdgraf
Browse files

bumping version and adding CLI for version

parent 5a90d185
No related branches found
No related tags found
No related merge requests found
"""Build an online book using Jupyter Notebooks and Jekyll.""" """Build an online book using Jupyter Notebooks and Jekyll."""
__version__ = "0.5.2dev0" __version__ = "0.5.2"
...@@ -3,3 +3,4 @@ from .build import build ...@@ -3,3 +3,4 @@ from .build import build
from .create import create from .create import create
from .upgrade import upgrade from .upgrade import upgrade
from .run import run from .run import run
from .version import version
import sys
import argparse
from jupyter_book import __version__
def version():
parser = argparse.ArgumentParser(
description="Print the version of Jupyter Book currently in-use.")
print("Running Jupyter Book version: {}".format(__version__))
\ No newline at end of file
import sys import sys
import argparse import argparse
from .commands import build, create, upgrade from .commands import build, create, upgrade, version
from .run import run_book from .run import run_book
from .toc import build_toc from .toc import build_toc
...@@ -12,7 +12,8 @@ commands = {'create': create, ...@@ -12,7 +12,8 @@ commands = {'create': create,
'build': build, 'build': build,
'upgrade': upgrade, 'upgrade': upgrade,
'run': run_book, 'run': run_book,
'toc': build_toc} 'toc': build_toc,
'version': version}
parser = argparse.ArgumentParser(description=DESCRIPTION) parser = argparse.ArgumentParser(description=DESCRIPTION)
parser.add_argument("command", help="The command you'd like to run. Allowed commands: {}".format( parser.add_argument("command", help="The command you'd like to run. Allowed commands: {}".format(
list(commands.keys()))) list(commands.keys())))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment