Skip to content

Commit fda21f3

Browse files
authored
fix(platform): use numbers in all recipe hooks (#9219)
The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 .
1 parent de1774b commit fda21f3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: platform.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ recipe.hooks.prebuild.6.pattern.windows=cmd /c if not exist "{build.path}\build_
191191

192192
# Set -DARDUINO_CORE_BUILD only on core file compilation
193193
file_opts.path={build.path}/file_opts
194-
recipe.hooks.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > {file_opts.path}"
195-
recipe.hooks.core.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > {file_opts.path}"
196-
recipe.hooks.core.postbuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > {file_opts.path}"
194+
recipe.hooks.prebuild.7.pattern=/usr/bin/env bash -c ": > {file_opts.path}"
195+
recipe.hooks.core.prebuild.1.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > {file_opts.path}"
196+
recipe.hooks.core.postbuild.1.pattern=/usr/bin/env bash -c ": > {file_opts.path}"
197197

198-
recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
199-
recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
200-
recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
198+
recipe.hooks.prebuild.7.pattern.windows=cmd /c type nul > "{file_opts.path}"
199+
recipe.hooks.core.prebuild.1.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
200+
recipe.hooks.core.postbuild.1.pattern.windows=cmd /c type nul > "{file_opts.path}"
201201

202202
# Generate debug.cfg (must be postbuild)
203203
recipe.hooks.postbuild.1.pattern=/usr/bin/env bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{debug.server.openocd.scripts_dir}"board/{build.openocdscript} "{build.source.path}"/debug.cfg"

0 commit comments

Comments
 (0)