Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the build reproducible #14

Merged
merged 1 commit into from
Jul 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/scripts/mkarv
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def parse_arguments():
"""each line contains a fragment length and count. It may """
))

parser.add_argument('-t', '--template-directory', default=locate_template_directory(sys.argv[0]), help=("""The location of the web app directory template."""))
parser.add_argument('-t', '--template-directory', default='auto', help=("""The location of the web app directory template."""))

parser.add_argument('-v', '--verbose', action='store_true', help='Talk more.')
parser.add_argument('--version', action='version', version=PROGRAM_VERSION)
Expand Down Expand Up @@ -570,6 +570,9 @@ def write_metrics(indent, metrics):
if __name__ == '__main__':
args = parse_arguments()

if args.template_directory == 'auto':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this now, it maybe nicer to use None, but that would look confusing in the --help output.

args.template_directory = locate_template_directory(sys.argv[0])

loglevel = args.verbose and logging.DEBUG or logging.INFO
logging.basicConfig(level=loglevel, format=LOGGING_FORMAT)
logger = logging.getLogger(PROGRAM)
Expand Down