Skip to content

Commit

Permalink
Fix binary-sizes.py script
Browse files Browse the repository at this point in the history
A while back we removed the nitrocli/ directory in the repository root.
Unfortunately, we missed that the binary-sizes.py script relied on the
previous directory structure. This change adjusts the script to work
with the new structure.
  • Loading branch information
d-e-s-o committed Jul 26, 2020
1 parent 6dd0daf commit 3f62110
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions var/binary-size.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python3 -B

#/***************************************************************************
# * Copyright (C) 2019 Daniel Mueller ([email protected]) *
# * Copyright (C) 2019-2020 Daniel Mueller ([email protected]) *
# * *
# * This program is free software: you can redistribute it and/or modify *
# * it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -86,9 +86,8 @@ def resolveCommit(commit):
def determineSizeAt(root, rev):
"""Determine the size of the nitrocli release build binary at the given git revision."""
sha1 = resolveCommit(rev)
with TemporaryDirectory() as d:
cwd = join(d, "nitrocli")
check_call(["git", "clone", root, d])
with TemporaryDirectory() as cwd:
check_call(["git", "clone", root, cwd])
check_call(["git", "checkout", "--quiet", sha1], cwd=cwd)
check_call(["cargo", "build", "--quiet", "--release"], cwd=cwd)

Expand Down

0 comments on commit 3f62110

Please sign in to comment.