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

Method postBuild

buildsystems/buildconfig_hooks.go:108–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106}
107
108func (b BuildConfig) postBuild() error {
109 for _, script := range b.PostBuild {
110 script = strings.TrimSpace(script)
111 if script == "" {
112 continue
113 }
114
115 title := fmt.Sprintf("[post build %s]", b.PortConfig.nameVersion())
116 script = b.expandVariables(script)
117 if err := checkUnexpandedVariables(script, title); err != nil {
118 return err
119 }
120 executor := cmd.NewExecutor(title, script)
121
122 // prebuild port does not have repo dir.
123 if fileio.PathExists(b.PortConfig.RepoDir) {
124 executor.SetWorkDir(b.PortConfig.RepoDir)
125 }
126
127 if err := executor.Execute(); err != nil {
128 return err
129 }
130 }
131
132 return nil
133}
134
135func (b BuildConfig) preInstall() error {
136 for _, script := range b.PreInstall {

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