@@ -66,7 +66,7 @@ const DEFAULT_BUILD_CORE = "arduino"
66
66
67
67
type Builder struct {}
68
68
69
- func (s * Builder ) Run (context map [ string ] interface {}, ctx * types.Context ) error {
69
+ func (s * Builder ) Run (ctx * types.Context ) error {
70
70
commands := []types.Command {
71
71
& GenerateBuildPathIfMissing {},
72
72
& EnsureBuildPathExists {},
@@ -113,14 +113,14 @@ func (s *Builder) Run(context map[string]interface{}, ctx *types.Context) error
113
113
& RecipeByPrefixSuffixRunner {Prefix : constants .HOOKS_POSTBUILD , Suffix : constants .HOOKS_PATTERN_SUFFIX },
114
114
}
115
115
116
- mainErr := runCommands (context , ctx , commands , true )
116
+ mainErr := runCommands (ctx , commands , true )
117
117
118
118
commands = []types.Command {
119
119
& PrintUsedAndNotUsedLibraries {},
120
120
121
121
& PrintUsedLibrariesIfVerbose {},
122
122
}
123
- otherErr := runCommands (context , ctx , commands , false )
123
+ otherErr := runCommands (ctx , commands , false )
124
124
125
125
if mainErr != nil {
126
126
return mainErr
@@ -131,7 +131,7 @@ func (s *Builder) Run(context map[string]interface{}, ctx *types.Context) error
131
131
132
132
type Preprocess struct {}
133
133
134
- func (s * Preprocess ) Run (context map [ string ] interface {}, ctx * types.Context ) error {
134
+ func (s * Preprocess ) Run (ctx * types.Context ) error {
135
135
commands := []types.Command {
136
136
& GenerateBuildPathIfMissing {},
137
137
& EnsureBuildPathExists {},
@@ -153,12 +153,12 @@ func (s *Preprocess) Run(context map[string]interface{}, ctx *types.Context) err
153
153
& PrintPreprocessedSource {},
154
154
}
155
155
156
- return runCommands (context , ctx , commands , true )
156
+ return runCommands (ctx , commands , true )
157
157
}
158
158
159
159
type ParseHardwareAndDumpBuildProperties struct {}
160
160
161
- func (s * ParseHardwareAndDumpBuildProperties ) Run (context map [ string ] interface {}, ctx * types.Context ) error {
161
+ func (s * ParseHardwareAndDumpBuildProperties ) Run (ctx * types.Context ) error {
162
162
commands := []types.Command {
163
163
& GenerateBuildPathIfMissing {},
164
164
@@ -167,18 +167,18 @@ func (s *ParseHardwareAndDumpBuildProperties) Run(context map[string]interface{}
167
167
& DumpBuildProperties {},
168
168
}
169
169
170
- return runCommands (context , ctx , commands , true )
170
+ return runCommands (ctx , commands , true )
171
171
}
172
172
173
- func runCommands (context map [ string ] interface {}, ctx * types.Context , commands []types.Command , progressEnabled bool ) error {
173
+ func runCommands (ctx * types.Context , commands []types.Command , progressEnabled bool ) error {
174
174
commandsLength := len (commands )
175
175
progressForEachCommand := float32 (100 ) / float32 (commandsLength )
176
176
177
177
progress := float32 (0 )
178
178
for _ , command := range commands {
179
179
PrintRingNameIfDebug (ctx , command )
180
180
printProgressIfProgressEnabledAndMachineLogger (progressEnabled , ctx , progress )
181
- err := command .Run (context , ctx )
181
+ err := command .Run (ctx )
182
182
if err != nil {
183
183
return i18n .WrapError (err )
184
184
}
@@ -207,17 +207,17 @@ func PrintRingNameIfDebug(ctx *types.Context, command types.Command) {
207
207
}
208
208
}
209
209
210
- func RunBuilder (context map [ string ] interface {}, ctx * types.Context ) error {
210
+ func RunBuilder (ctx * types.Context ) error {
211
211
command := Builder {}
212
- return command .Run (context , ctx )
212
+ return command .Run (ctx )
213
213
}
214
214
215
- func RunParseHardwareAndDumpBuildProperties (context map [ string ] interface {}, ctx * types.Context ) error {
215
+ func RunParseHardwareAndDumpBuildProperties (ctx * types.Context ) error {
216
216
command := ParseHardwareAndDumpBuildProperties {}
217
- return command .Run (context , ctx )
217
+ return command .Run (ctx )
218
218
}
219
219
220
- func RunPreprocess (context map [ string ] interface {}, ctx * types.Context ) error {
220
+ func RunPreprocess (ctx * types.Context ) error {
221
221
command := Preprocess {}
222
- return command .Run (context , ctx )
222
+ return command .Run (ctx )
223
223
}
0 commit comments