mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-01 21:52:12 +01:00
Fix built-in examples update during build
Previously, the built-in examples assembly step of the build system set the `final_folder` parameter of the `unzip` target to the true final installation location of the examples. The behavior of the `unzip` target is to only unzip the archive if `final_folder` doesn't exist. Because that folder will exist any time a previous build has been done and `ant clean` was not run, the archive will not be unzipped. This causes the build to fail after an update to the built-in examples version when it attempts to copy the examples from the version-dependent extraction staging folder to the final location. The fix is to set the `final_folder` parameter to the version-dependent staging folder location, which will cause the extraction to happen every time the examples version is updated, but to be skipped when there was no update.
This commit is contained in:
parent
7a9234c304
commit
5bf14b8b7b
@ -242,7 +242,8 @@
|
||||
<antcall target="unzip">
|
||||
<param name="archive_file" value="${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}.zip" />
|
||||
<param name="archive_url" value="https://github.com/${BUILT-IN-EXAMPLES-REPOSITORY-OWNER}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}/archive/${BUILT-IN-EXAMPLES-VERSION}.zip" />
|
||||
<param name="final_folder" value="${BUILT-IN-EXAMPLES-FINAL-PATH}" />
|
||||
<!-- Because the presence of this folder determines whether the extraction happens, this must point to a version-dependent path, otherwise updates will fail -->
|
||||
<param name="final_folder" value="${BUILT-IN-EXAMPLES-STAGING-PATH}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}/examples" />
|
||||
<param name="dest_folder" value="${BUILT-IN-EXAMPLES-STAGING-PATH}" />
|
||||
</antcall>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user