MCPcopy Index your code
hub / github.com/celer-pkg/celer / deploy

Method deploy

configs/project.go:120–149  ·  view source on GitHub ↗
(force, strip bool)

Source from the content-addressed store, hash-verified

118}
119
120func (p Project) deploy(force, strip bool) error {
121 options := InstallOptions{
122 Force: force,
123 Recursive: true,
124 }
125
126 // Collect a single deploy-wide report that includes all project ports.
127 deployReport := newInstallReport(p.GetName())
128
129 for _, nameVersion := range p.Ports {
130 var port Port
131 if err := port.Init(p.ctx, nameVersion); err != nil {
132 return fmt.Errorf("failed to init %s -> %w", nameVersion, err)
133 }
134
135 port.installReport = deployReport
136 if _, err := port.Install(options); err != nil {
137 return fmt.Errorf("failed to install %s -> %w", nameVersion, err)
138 }
139 }
140
141 // Strip ELF binaries and shared libraries to deduce the file size.
142 if strip {
143 if err := p.stripDeployed(); err != nil {
144 return fmt.Errorf("failed to strip deployed binaries -> %w", err)
145 }
146 }
147
148 return nil
149}
150
151// stripDeployed walks the per-platform installed tree and runs strip on every
152// ELF file found. Static archives (.a) are intentionally skipped — stripping

Callers 1

DeployMethod · 0.80

Calls 5

GetNameMethod · 0.95
InitMethod · 0.95
InstallMethod · 0.95
stripDeployedMethod · 0.95
newInstallReportFunction · 0.85

Tested by

no test coverage detected