Skip to content

Commit

Permalink
[conan-v2] hooks arguments changed in beta1 (#436)
Browse files Browse the repository at this point in the history
* [conan-v2] hooks arguments changed in beta1

* out of quarantine
  • Loading branch information
jgsogo authored Aug 4, 2022
1 parent b4fedab commit 0bb78be
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ def load_yml(conanfile, path):
return None


def post_export(output, conanfile, conanfile_path, reference, **kwargs):
export_folder_path = os.path.dirname(conanfile_path)

conandata_path = os.path.join(export_folder_path, "conandata.yml")
def post_export(conanfile):
conandata_path = os.path.join(conanfile.export_folder, "conandata.yml")
version = str(conanfile.version)

conandata_yml = load_yml(conanfile, conandata_path)
Expand All @@ -25,7 +23,7 @@ def post_export(output, conanfile, conanfile_path, reference, **kwargs):
continue
info[entry] = {}
info[entry][version] = conandata_yml[entry][version]
output.info("Saving conandata.yml: {}".format(info))
conanfile.output.info("Saving conandata.yml: {}".format(info))
new_conandata_yml = yaml.safe_dump(info, default_flow_style=False)
output.info("New conandata.yml contents: {}".format(new_conandata_yml))
conanfile.output.info("New conandata.yml contents: {}".format(new_conandata_yml))
save(conanfile, conandata_path, new_conandata_yml)

0 comments on commit 0bb78be

Please sign in to comment.