Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5f73378

Browse filesBrowse files
Add hooks hooks.savehex.presavehex and hooks.savehex.postsavehex (#2091)
1 parent 2f5b767 commit 5f73378
Copy full SHA for 5f73378

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎commands/compile/compile.go

Copy file name to clipboardExpand all lines: commands/compile/compile.go
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
257257
exportBinaries = false
258258
}
259259
if exportBinaries {
260+
presaveHex := builder.RecipeByPrefixSuffixRunner{Prefix: "recipe.hooks.savehex.presavehex", Suffix: ".pattern"}
261+
if err := presaveHex.Run(builderCtx); err != nil {
262+
return r, err
263+
}
264+
260265
var exportPath *paths.Path
261266
if exportDir := req.GetExportDir(); exportDir != "" {
262267
exportPath = paths.New(exportDir)
@@ -290,6 +295,11 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
290295
return r, &arduino.PermissionDeniedError{Message: tr("Error copying output file %s", buildFile), Cause: err}
291296
}
292297
}
298+
299+
postsaveHex := builder.RecipeByPrefixSuffixRunner{Prefix: "recipe.hooks.savehex.postsavehex", Suffix: ".pattern"}
300+
if err := postsaveHex.Run(builderCtx); err != nil {
301+
return r, err
302+
}
293303
}
294304

295305
r.ExecutableSectionsSize = builderCtx.ExecutableSectionsSize.ToRPCExecutableSectionSizeArray()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.