Add export-pkg support for art:build-info create command#201
Conversation
| def get_artifacts_folder(self, node, artifact_type): | ||
| if artifact_type == "package": | ||
| return node.get("package_folder") | ||
| else: | ||
| reference = RecipeReference.loads(node.get("ref")) | ||
| return self._conan_api.cache.export_path(reference) |
There was a problem hiding this comment.
the package folder is ok in both conan create/install and export-pkg graphs, however for the re recipe_folder, in the export-pkg graph the path points to the user local folder, so here I resorted to query the conan cache to get the recipe path in the cache
|
For clarification: There was already a test for export-pkg at The test was not failing because it it using the artifactory server to search for the "missing" files (conan_sources.tgz). However, the conan_sources.tgz are already in the conan cache, but the recipe_folder was pointing to the user's local folder instead of the conan cache (the fix in this PR), and it was not finding them. PD: Another question arises at this point. If the recipe used for export-pkg, does not have source()/export/export_sources, does it make sense to look for the conan_sources.tgz? |
A recipe that is created with |
| run("conan new cmake_lib -d name=lib2 -d version=1.0 -d requires=lib1/1.0 --force") | ||
| run("conan build .") | ||
| run("conan export-pkg . --test-folder= -f json > export_pkg.json") | ||
| run("conan upload lib* -c -r conancenter --dry-run") # To generate the .tgz files in conan local cache |
There was a problem hiding this comment.
More a question for the client: Isn't it possible to pass an empty remote or not add the argument for a dry-run? (I guess it's not but maybe it should be possible?) passing conancenter there feels a bit odd
There was a problem hiding this comment.
It is not possible, the --dry-run still checks in the remote what needs to be uploaded and what not, so it checks the server too.
closes #199