MCPcopy Create free account
hub / github.com/celer-pkg/celer / postInstall

Method postInstall

buildsystems/buildconfig_hooks.go:162–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160}
161
162func (b BuildConfig) postInstall() error {
163 for _, script := range b.PostInstall {
164 script = strings.TrimSpace(script)
165 if script == "" {
166 continue
167 }
168
169 title := fmt.Sprintf("[post install %s]", b.PortConfig.nameVersion())
170 script = b.expandVariables(script)
171 if err := checkUnexpandedVariables(script, title); err != nil {
172 return err
173 }
174 executor := cmd.NewExecutor(title, script)
175
176 // prebuild port does not have repo dir.
177 if fileio.PathExists(b.PortConfig.RepoDir) {
178 executor.SetWorkDir(b.PortConfig.RepoDir)
179 }
180
181 if err := executor.Execute(); err != nil {
182 return err
183 }
184 }
185
186 return nil
187}
188
189func (b BuildConfig) fixBuild() error {
190 for _, script := range b.FixBuild {

Callers

nothing calls this directly

Calls 8

expandVariablesMethod · 0.95
NewExecutorFunction · 0.92
PathExistsFunction · 0.92
checkUnexpandedVariablesFunction · 0.85
SprintfMethod · 0.80
nameVersionMethod · 0.80
SetWorkDirMethod · 0.80
ExecuteMethod · 0.80

Tested by

no test coverage detected