Skip to content

Commit

Permalink
Automatic deploy (build number 30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConanCI bot committed Apr 8, 2024
1 parent 6fa5188 commit d51baf9
Show file tree
Hide file tree
Showing 292 changed files with 926 additions and 745 deletions.
2 changes: 1 addition & 1 deletion 2.1/404.html
Expand Up @@ -119,7 +119,7 @@ <h1>Page Not Found<a class="headerlink" href="#page-not-found" title="Link to th

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/Page Not Found.html
Expand Up @@ -112,7 +112,7 @@ <h1>Page not found</h1>

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
4 changes: 2 additions & 2 deletions 2.1/_sources/examples/tools/autotools/autotools.rst.txt
@@ -1,8 +1,8 @@
.. _examples_autotools:


tools.autotools
===============
Autotools
=========


.. toctree::
Expand Down
4 changes: 2 additions & 2 deletions 2.1/_sources/examples/tools/cmake/cmake.rst.txt
@@ -1,8 +1,8 @@
.. _examples_cmake:


tools.cmake
===========
CMake
=====


.. toctree::
Expand Down
5 changes: 2 additions & 3 deletions 2.1/_sources/examples/tools/files/files.rst.txt
@@ -1,8 +1,7 @@
.. _examples_files:


tools.files
===========
File interaction
================


.. toctree::
Expand Down
4 changes: 2 additions & 2 deletions 2.1/_sources/examples/tools/google/bazel.rst.txt
@@ -1,8 +1,8 @@
.. _examples_tools_bazel:


tools.google
============
Bazel
=====

.. toctree::
:maxdepth: 2
Expand Down
4 changes: 2 additions & 2 deletions 2.1/_sources/examples/tools/meson/meson.rst.txt
@@ -1,8 +1,8 @@
.. _examples_tools_meson:


tools.meson
===========
Meson
=====


.. toctree::
Expand Down
4 changes: 2 additions & 2 deletions 2.1/_sources/examples/tools/microsoft/msbuild.rst.txt
@@ -1,8 +1,8 @@
.. _examples_tools_msbuild:


tools.microsoft
===============
MSBuild
=======


.. toctree::
Expand Down
Expand Up @@ -30,7 +30,6 @@ There we will find a small "hello" project, containing this ``conanfile.py``:
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.scm import Git
from conan.tools.files import load, update_conandata
class helloRecipe(ConanFile):
Expand All @@ -45,18 +44,13 @@ There we will find a small "hello" project, containing this ``conanfile.py``:
def export(self):
git = Git(self, self.recipe_folder)
scm_url, scm_commit = git.get_url_and_commit()
self.output.info(f"Obtained URL: {scm_url} and {scm_commit}")
# we store the current url and commit in conandata.yml
update_conandata(self, {"sources": {"commit": scm_commit, "url": scm_url}})
# save the url and commit in conandata.yml
git.coordinates_to_conandata()
def source(self):
# we recover the saved url and commit from conandata.yml and use them to get sources
git = Git(self)
sources = self.conan_data["sources"]
self.output.info(f"Cloning sources from: {sources}")
git.clone(url=sources["url"], target=".")
git.checkout(commit=sources["commit"])
git.checkout_from_conandata_coordinates()
...
Expand All @@ -77,26 +71,47 @@ please create a folder outside of the ``examples2`` repository, and copy the con
# Finally create the package
$ conan create .
...
hello/0.1: WARN: Current commit 8e8764c40bebabbe3ec57f9a0816a2c8e691f559 doesn't exist in remote origin
======== Exporting recipe to the cache ========
hello/0.1: Exporting package recipe: /myfolder/conanfile.py
hello/0.1: Calling export()
hello/0.1: RUN: git status . --short --no-branch --untracked-files
hello/0.1: RUN: git rev-list HEAD -n 1 --full-history -- "."
hello/0.1: RUN: git remote -v
hello/0.1: RUN: git branch -r --contains cb7815a58529130b49da952362ce8b28117dee53
hello/0.1: RUN: git fetch origin --dry-run --depth=1 cb7815a58529130b49da952362ce8b28117dee53
hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist in remote origin
This revision will not be buildable in other computer
hello/0.1: Obtained URL: <local-path>/capture_scm and 8e8764c40bebabbe3ec57f9a0816a2c8e691f559
hello/0.1: Copied 1 '.yml' file: conandata.yml
hello/0.1: RUN: git rev-parse --show-toplevel
hello/0.1: Copied 1 '.py' file: conanfile.py
hello/0.1: Copied 1 '.yml' file: conandata.yml
hello/0.1: Exported to cache folder: /.conan2/p/hello237d6f9f65bba/e
...
hello/0.1: Cloning sources from: {'commit': '8e8764c40bebabbe3ec57f9a0816a2c8e691f559', 'url': '<local-path>/capture_scm'}
======== Installing packages ========
hello/0.1: Calling source() in /.conan2/p/hello237d6f9f65bba/s
hello/0.1: Cloning git repo
hello/0.1: RUN: git clone "<hidden>" "."
hello/0.1: Checkout: cb7815a58529130b49da952362ce8b28117dee53
hello/0.1: RUN: git checkout cb7815a58529130b49da952362ce8b28117dee53
Let's explain step by step what is happening:

- When the recipe is exported to the Conan cache, the ``export()`` method executes, running ``scm_url, scm_commit = git.get_url_and_commit()``. See the :ref:`Git reference<conan_tools_scm_git>` for more information about these methods.
- When the recipe is exported to the Conan cache, the ``export()`` method executes, ``git.coordinates_to_conandata()``,
which stores the Git URL and commit in the ``conandata.yml`` file by internally calling ``git.get_url_and_commit()``.
See the :ref:`Git reference<conan_tools_scm_git>` for more information about these methods.
- This obtains the URL of the repo pointing to the local ``<local-path>/capture_scm`` and the commit ``8e8764c40bebabbe3ec57f9a0816a2c8e691f559``
- It warns that this information will **not** be enough to re-build from source this recipe once the package is uploaded to the server and is tried to be built from source in other computer, which will not contain the path pointed by ``<local-path>/capture_scm``. This is expected, as the repository that we created doesn't have any remote defined. If our local clone had a remote defined and that remote contained the ``commit`` that we are building, the ``scm_url`` would point to the remote repository instead, making the build from source fully reproducible.
- The ``export()`` method stores the ``url`` and ``commit`` information in the ``conandata.yml`` for future reproducibility.
- When the package needs to be built from sources and it calls the ``source()`` method, it recovers the information from the ``conandata.yml`` file, and calls ``git.clone()`` with it to retrieve the sources. In this case, it will be cloning from the local checkout in ``<local-path>/capture_scm``, but if it had a remote defined, it will clone from it.
- When the package needs to be built from sources and it calls the ``source()`` method,
it recovers the information from the ``conandata.yml`` file inside the ``git.checkout_from_conandata_coordinates()`` method,
which internally calls ``git.clone()`` with it to retrieve the sources.
In this case, it will be cloning from the local checkout in ``<local-path>/capture_scm``, but if it had a remote defined, it will clone from it.


.. warning::

To achieve reproducibility, it is very important for this **scm capture** technique that the current checkout is not dirty. If it was dirty, it would be impossible to guarantee future reproducibility of the build, so ``git.get_url_and_commit()`` can raise errors, and require to commit changes. If more than 1 commit is necessary, it would be recommended to squash those commits before pushing changes to upstream repositories.
To achieve reproducibility, it is very important for this **scm capture** technique that the current checkout is not dirty
If it was dirty, it would be impossible to guarantee future reproducibility of the build, so ``git.get_url_and_commit()`` can raise errors,
and require to commit changes. If more than 1 commit is necessary, it would be recommended to squash those commits before pushing changes to upstream repositories.

If we do now a second ``conan create .``, as the repo is dirty we would get:

Expand Down
2 changes: 1 addition & 1 deletion 2.1/changelog.html
Expand Up @@ -826,7 +826,7 @@ <h2>2.0.0-beta1 (20-Jun-2022)<a class="headerlink" href="#beta1-20-jun-2022" tit

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
Binary file modified 2.1/conan.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion 2.1/devops.html
Expand Up @@ -139,7 +139,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
Expand Up @@ -166,7 +166,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/backup_sources/sources_backup.html
Expand Up @@ -261,7 +261,7 @@ <h3>Upload the packages<a class="headerlink" href="#upload-the-packages" title="

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/conancenter/hosting_binaries.html
Expand Up @@ -158,7 +158,7 @@ <h2>Updating from upstream<a class="headerlink" href="#updating-from-upstream" t

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/metadata.html
Expand Up @@ -411,7 +411,7 @@ <h2>test_package as metadata<a class="headerlink" href="#test-package-as-metadat

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/save_restore.html
Expand Up @@ -180,7 +180,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/using_conancenter.html
Expand Up @@ -239,7 +239,7 @@ <h2>Control and customization<a class="headerlink" href="#control-and-customizat

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/versioning.html
Expand Up @@ -137,7 +137,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/devops/versioning/resolve_prereleases.html
Expand Up @@ -181,7 +181,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
14 changes: 7 additions & 7 deletions 2.1/examples.html
Expand Up @@ -130,13 +130,13 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="examples/tools.html">Conan recipe tools examples</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/cmake/cmake.html">tools.cmake</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/files/files.html">tools.files</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/meson/meson.html">tools.meson</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/google/bazel.html">tools.google</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/autotools/autotools.html">tools.autotools</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/cmake/cmake.html">CMake</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/files/files.html">File interaction</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/meson/meson.html">Meson</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/google/bazel.html">Bazel</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/autotools/autotools.html">Autotools</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/scm/git/capture_scm/git_capture_scm.html">Capturing Git scm information</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/microsoft/msbuild.html">tools.microsoft</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/tools/microsoft/msbuild.html">MSBuild</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="examples/cross_build.html">Cross-building examples</a><ul>
Expand Down Expand Up @@ -181,7 +181,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/commands.html
Expand Up @@ -145,7 +145,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/commands/pkglists.html
Expand Up @@ -304,7 +304,7 @@ <h2>Removing packages lists<a class="headerlink" href="#removing-packages-lists"

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile.html
Expand Up @@ -151,7 +151,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/layout.html
Expand Up @@ -150,7 +150,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/layout/conanfile_in_subfolder.html
Expand Up @@ -218,7 +218,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/layout/editable_components.html
Expand Up @@ -246,7 +246,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/layout/multiple_subprojects.html
Expand Up @@ -245,7 +245,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/layout/third_party_libraries.html
Expand Up @@ -225,7 +225,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/package_info.html
Expand Up @@ -146,7 +146,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/conanfile/package_info/components.html
Expand Up @@ -348,7 +348,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
Expand Up @@ -142,7 +142,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 2.1/examples/config_files.html
Expand Up @@ -143,7 +143,7 @@

<div role="contentinfo">
<p>&#169; Copyright 2016-2024, JFrog.
<span class="lastupdated">Last updated on Apr 04, 2024.
<span class="lastupdated">Last updated on Apr 08, 2024.
</span></p>
</div>

Expand Down

0 comments on commit d51baf9

Please sign in to comment.