MCPcopy
hub / github.com/apache/answer / buildUI

Function buildUI

internal/cli/build.go:382–397  ·  view source on GitHub ↗

buildUI run pnpm install and pnpm build commands to build ui

(b *buildingMaterial)

Source from the content-addressed store, hash-verified

380
381// buildUI run pnpm install and pnpm build commands to build ui
382func buildUI(b *buildingMaterial) (err error) {
383 localUIBuildDir := filepath.Join(b.tmpDir, "vendor/github.com/apache/answer/ui")
384
385 pnpmInstallCmd := b.newExecCmd("pnpm", "pre-install")
386 pnpmInstallCmd.Dir = localUIBuildDir
387 if err = pnpmInstallCmd.Run(); err != nil {
388 return err
389 }
390
391 pnpmBuildCmd := b.newExecCmd("pnpm", "build")
392 pnpmBuildCmd.Dir = localUIBuildDir
393 if err = pnpmBuildCmd.Run(); err != nil {
394 return err
395 }
396 return nil
397}
398
399// mergeI18nFiles merge i18n files
400func mergeI18nFiles(b *buildingMaterial) (err error) {

Callers

nothing calls this directly

Calls 2

newExecCmdMethod · 0.80
RunMethod · 0.80

Tested by

no test coverage detected