Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion extensions/commands/art/cmd_build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ def get_artifacts(self, node, artifact_type, is_dependency=False):
assert artifact_type in ["recipe", "package"]

if artifact_type == "recipe":
artifacts_names = ["conan_sources.tgz", "conan_export.tgz", "conanfile.py", "conanmanifest.txt"]
artifacts_names = ["conanfile.py", "conanmanifest.txt"]
reference = RecipeReference.loads(node.get("ref"))
export_path = self._conan_api.cache.export_path(reference)
if set(os.listdir(export_path)) != set(artifacts_names): # Check if recipe has additional exports files
artifacts_names.append("conan_export.tgz")
artifacts_names.append("conan_sources.tgz")
else:
artifacts_names = ["conan_package.tgz", "conaninfo.txt", "conanmanifest.txt"]

Expand Down
6 changes: 3 additions & 3 deletions tests/test_build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ def test_formatted_time():

def test_missing_files_warning():
"""
Test that a warning is issued when .tgz files are missing from the build-info JSON
Test that there are no warnings about missing .tgz files
"""
run("conan new header_lib -d name=lib1 -d version=1.0")
run("conan create . -f json > create.json")
graph = json.loads(load("create.json"))["graph"]
_fake_conan_sources(graph)
run("conan upload lib1/1.0 -r conancenter --dry-run") # Simulate upload to generate the expected .tgz files

out = run("conan art:build-info create create.json build_name 1 repo --with-dependencies > bi.json")
assert "WARN: There are missing .tgz files (conan_export.tgz)" in out
assert "WARN: There are missing .tgz files (conan_package.tgz)" in out
assert not "WARN: There are missing .tgz files" in out
Loading