fix(packaging): preserve device-test source bytes in subtree archives
This commit is contained in:
1 parent
7d31e09cb7
commit
8bf2cb8740
1 file changed
+10
-1
@@ -31,7 +31,16 @@ def main():
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
commit = git(root, "rev-parse", "--verify", "--end-of-options", args.ref + "^{commit}")
|
||||
commit = commit.decode("ascii").strip()
|
||||
source = git(root, "archive", "--format=tar", commit + ":plugins/artemis-device-test")
|
||||
# A subtree archive does not retain its parent's attributes; disable checkout
|
||||
# conversion explicitly so source-manifest hashes still bind the Git blobs.
|
||||
source = git(
|
||||
root,
|
||||
"-c",
|
||||
"core.autocrlf=false",
|
||||
"archive",
|
||||
"--format=tar",
|
||||
commit + ":plugins/artemis-device-test",
|
||||
)
|
||||
files = {}
|
||||
with tarfile.open(fileobj=io.BytesIO(source)) as tree:
|
||||
for entry in tree:
|
||||
|
||||
Reference in new issue
Block a user