Fix local builds of feedstock submodules #1826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1825
In
conda-smithy
version3.28.0
logic was added to store metadata about CI ( #1577 ) like thesha
of the feedstock that was used to build. As thesha
variable may not be set when running locally, logic was added with the container to determine this by runninggit rev-parse
to fill in this valueconda-smithy/conda_smithy/templates/build_steps.sh.tmpl
Lines 86 to 90 in 00fcb77
While this works in the simple case of cloning a feedstock directly, it does not work in the case of building a feedstock from a submodule as is the case with the
feedstocks
repo. This is due to the fact that the.git
repo information is not full available within the Docker container as it does not exist in the feedstock that is mounted (and is not otherwise provided for).However this information is available before spinning up the Docker container. So this PR moves the logic to fill in
sha
to precede spinning up the Docker container. This is equivalent to the behavior already present in the local macOS builds, which don't use containersconda-smithy/conda_smithy/templates/run_osx_build.sh.tmpl
Lines 68 to 70 in 00fcb77
Closes conda-forge/ca-certificates-feedstock#64 (used for testing these changes)
Checklist
news
entry