Skip to content

Commit 25e6df5

Browse files
committed
Use the last part of the FQBN for suggested profile name
1 parent f7d5354 commit 25e6df5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/compile/compile.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,13 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
291291
fmt.Println(tr("Currently, Build Profiles only support libraries available through Arduino Library Manager."))
292292
}
293293

294+
newProfileName := "my_profile_name"
295+
if split := strings.Split(compileRequest.GetFqbn(), ":"); len(split) > 2 {
296+
newProfileName = split[2]
297+
}
294298
fmt.Println()
295299
fmt.Println("profile:")
296-
fmt.Println(" my_profile_name:")
300+
fmt.Println(" " + newProfileName + ":")
297301
fmt.Println(" fqbn: " + compileRequest.GetFqbn())
298302
fmt.Println(" platforms:")
299303
boardPlatform := compileRes.GetBoardPlatform()

0 commit comments

Comments
 (0)