Closed igrr closed 1 year ago
@igrr There might be one alternative solution which uses slightly more disk space than --depth 1 --shallow-submodules
, but it still yields nice gain. Just replace depth, by single-branch:
--single-branch --shallow-submodules
This way there is branch name and history of the branch.
Hm, weird thing is that deployment created by Offline Installer has branch name working without problem when --depth
is set to 1
. The procedure is in Build-Installer.ps1.
https://github.com/espressif/idf-installer/blob/main/Build-Installer.ps1#L231
@igrr The behavior of the installer was changed to use single branch when optimization is turned on. Tests indicates that the solution works.
Please test the build: https://github.com/espressif/idf-installer/releases/tag/online-2.18-beta-04
Solved by switching from --depth 1 to --single-branch when cloning repo. Please, test the latest idf-installer 2.19: https://github.com/espressif/idf-installer/releases
When the installer downloads a release branch, creation of local IDF repository is done in two stages:
In the 2nd step, we may perform "shallow" clone if such option is chosen by the user. Shallow repository doesn't contain any tags, so "git describe" will later not work correctly in the repository. In particular, IDF build system will not determine the version correctly, which can be seen in the output of the 2nd stage bootloader.
This is a partial fix to the problem. In order to make "git describe" work, we fetch one of the tags from the same release branch.
Note that this fix still doesn't solve the issue in two cases:
Possible fix for https://github.com/espressif/esp-idf/issues/10342.
TODOs