Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/reuse python scm #3576

Merged
merged 8 commits into from Sep 21, 2018
Merged

Conversation

@memsharded
Copy link
Member

@memsharded memsharded commented Sep 19, 2018

  • Refer to the issue that supports this Pull Request.
    Fix #3461

Changelog: Bugfix: Fixed scm replacement of the variable when exporting a conanfile.

@ghost ghost assigned memsharded Sep 19, 2018
@ghost ghost added the stage: review label Sep 19, 2018
@memsharded memsharded assigned lasote and unassigned memsharded Sep 20, 2018
@memsharded memsharded added this to the 1.8 milestone Sep 20, 2018
@ghost ghost assigned memsharded Sep 20, 2018
@@ -89,7 +90,33 @@ def _capture_export_scm_data(conanfile, conanfile_dir, destination_folder, outpu
# Generate the scm_folder.txt file pointing to the src_path
src_path = scm.get_repo_root()
save(scm_src_file, src_path.replace("\\", "/"))
scm_data.replace_in_file(os.path.join(destination_folder, "conanfile.py"))

Copy link
Contributor

@lasote lasote Sep 20, 2018

I would feel a bit more comfortable extracting this to a replace_scm function. The overall together is a bit scary.

lasote
lasote approved these changes Sep 21, 2018
@lasote lasote merged commit a4d2233 into conan-io:develop Sep 21, 2018
2 checks passed
@ghost ghost removed the stage: review label Sep 21, 2018
@memsharded memsharded deleted the feature/reuse_python_scm branch Oct 7, 2018
grisumbras pushed a commit to grisumbras/conan that referenced this issue Dec 27, 2018
* adding test

* AST scm replace

* fixing replacement

* more testing and fixing bugs

* fixing tests

* refactor replace code to function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants