build: bootstrap: add pnpm install (#3959)
Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>pull/3962/head
parent
cd6d034e5b
commit
3794745bee
|
@ -54,6 +54,7 @@ func cmdBootstrapRun(_ *cobra.Command, _ []string) {
|
||||||
|
|
||||||
createTemporaryDirectory()
|
createTemporaryDirectory()
|
||||||
createPNPMDirectory()
|
createPNPMDirectory()
|
||||||
|
pnpmInstall()
|
||||||
|
|
||||||
bootstrapPrintln("Preparing /etc/hosts to serve subdomains of example.com...")
|
bootstrapPrintln("Preparing /etc/hosts to serve subdomains of example.com...")
|
||||||
prepareHostsFile()
|
prepareHostsFile()
|
||||||
|
@ -156,6 +157,17 @@ func createPNPMDirectory() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func pnpmInstall() {
|
||||||
|
bootstrapPrintln("Installing web dependences ")
|
||||||
|
|
||||||
|
cwd, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
shell(fmt.Sprintf("cd %s/web && pnpm install", cwd))
|
||||||
|
}
|
||||||
|
|
||||||
func bootstrapPrintln(args ...interface{}) {
|
func bootstrapPrintln(args ...interface{}) {
|
||||||
a := make([]interface{}, 0)
|
a := make([]interface{}, 0)
|
||||||
a = append(a, "[BOOTSTRAP]")
|
a = append(a, "[BOOTSTRAP]")
|
||||||
|
|
Loading…
Reference in New Issue