Skip to content

Commit

Permalink
Add --print-basename option
Browse files Browse the repository at this point in the history
--print-basename will return the formatted versioning string for generated assets
  • Loading branch information
eFrane committed Jan 1, 2018
1 parent d4831ee commit 9c4fa65
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ def configure_argument_parser():
action='store',
)

parser.add_argument(
'--print-basename',
help='This will output the base name used for build output',
action='store_true',
dest='print_basename'
)

parser.add_argument(
'--latex-template',
help='Change the latex template used for PDF generation',
Expand Down Expand Up @@ -315,6 +322,12 @@ def main():
if options.version is None:
options.version = get_git_describe_version()

filename_base = get_filename_base(options.language, options.version)

if options.print_basename:
print(filename_base)
exit(0)

tools = check_available_tools()

# always clean
Expand All @@ -323,7 +336,6 @@ def main():
if action == 'clean':
exit(0)

filename_base = get_filename_base(options.language, options.version)
prepare_builddir(filename_base)
prepare_schema(options.language)
prepare_markdown(options.language)
Expand Down

0 comments on commit 9c4fa65

Please sign in to comment.