Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/arduino/Arduino.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorper1234 <accounts@perglass.com>2020-10-09 07:52:51 +0300
committerper1234 <accounts@perglass.com>2020-10-09 07:57:16 +0300
commit5bf14b8b7bcd3c33497e6f408ab2b56b259e744e (patch)
tree1a027b2b2e99c65d3b25423de8cf0ff86f691132 /build
parent7a9234c30461c728441aeab393763b39fc4fce64 (diff)
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.
Diffstat (limited to 'build')
-rw-r--r--build/build.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/build.xml b/build/build.xml
index 72129efb0..a5f974ef4 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -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>