(force, strip bool)
| 118 | } |
| 119 | |
| 120 | func (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 |
no test coverage detected