Skip to content

Commit 6e3e5e9

Browse files
committed
fix(platform): use numbers in all recipe hooks
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 4cbce10 commit 6e3e5e9

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
@@ -146,13 +146,13 @@ recipe.hooks.prebuild.6.pattern.windows=cmd /c if not exist "{build.path}\build_
146146

147147
# Set -DARDUINO_CORE_BUILD only on core file compilation
148148
file_opts.path={build.path}/file_opts
149-
recipe.hooks.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'"
150-
recipe.hooks.core.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > '{file_opts.path}'"
151-
recipe.hooks.core.postbuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'"
149+
recipe.hooks.prebuild.7.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'"
150+
recipe.hooks.core.prebuild.1.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > '{file_opts.path}'"
151+
recipe.hooks.core.postbuild.1.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'"
152152

153-
recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
154-
recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
155-
recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
153+
recipe.hooks.prebuild.7.pattern.windows=cmd /c type nul > "{file_opts.path}"
154+
recipe.hooks.core.prebuild.1.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
155+
recipe.hooks.core.postbuild.1.pattern.windows=cmd /c type nul > "{file_opts.path}"
156156

157157
# Generate debug.cfg (must be postbuild)
158158
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)