diff --git a/website/camweb.go b/website/camweb.go index 44b197ad8..40c4f98dd 100644 --- a/website/camweb.go +++ b/website/camweb.go @@ -78,7 +78,7 @@ var ( logStdout = flag.Bool("logstdout", true, "Whether to log to stdout") tlsCertFile = flag.String("tlscert", "", "TLS cert file") tlsKeyFile = flag.String("tlskey", "", "TLS private key file") - alsoRun = flag.String("also_run", "", "[optiona] Path to run as a child process. (Used to run camlistore.org's ./scripts/run-blob-server)") + alsoRun = flag.String("also_run", "", "[optiona] Path to run as a child process. (Used to run perkeep.org's ./scripts/run-blob-server)") devMode = flag.Bool("dev", false, "in dev mode") flagStaging = flag.Bool("staging", false, "Deploy to a test GCE instance. Requires -cloudlaunch=true") @@ -189,7 +189,7 @@ func servePage(w http.ResponseWriter, params pageParams) { if strings.Contains(title, cmdPattern) && subtitle != cmdPattern { toInsert := `
go get camlistore.org/cmd/` + subtitle + `+
go get ` + prodDomain + `/cmd/` + subtitle + `
` content = bytes.Replace(content, []byte("
"), []byte(toInsert), 1) } @@ -518,7 +518,7 @@ func gceDeployHandlerConfig() (*gce.Config, error) { configFile := filepath.Join(osutil.CamliConfigDir(), "launcher-config.json") data, err := ioutil.ReadFile(configFile) if err != nil { - return nil, fmt.Errorf("error reading launcher-config.json (expected of type https://godoc.org/camlistore.org/pkg/deploy/gce#Config): %v", err) + return nil, fmt.Errorf("error reading launcher-config.json (expected of type https://godoc.org/"+prodDomain+"/pkg/deploy/gce#Config): %v", err) } var config gce.Config if err := json.Unmarshal(data, &config); err != nil { @@ -603,7 +603,7 @@ func checkInProduction() bool { } const ( - prodSrcDir = "/var/camweb/src/camlistore.org" + prodSrcDir = "/var/camweb/src/" + prodDomain prodLECacheDir = "/var/le/letsencrypt.cache" ) @@ -1187,9 +1187,9 @@ func camSrcDir() string { if inProd { return prodSrcDir } - dir, err := osutil.GoPackagePath("camlistore.org") + dir, err := osutil.GoPackagePath(prodDomain) if err != nil { - log.Fatalf("Failed to find the root of the Camlistore source code via osutil.GoPackagePath: %v", err) + log.Fatalf("Failed to find the root of the %s source code via osutil.GoPackagePath: %v", prodDomain, err) } return dir } diff --git a/website/contributors.go b/website/contributors.go index 037db1c3d..fe1927731 100644 --- a/website/contributors.go +++ b/website/contributors.go @@ -83,7 +83,7 @@ func gitShortlog() *exec.Cmd { "--workdir="+prodSrcDir, ) } else { - hostRoot, err := osutil.GoPackagePath("camlistore.org") + hostRoot, err := osutil.GoPackagePath(prodDomain) if err != nil { log.Fatal(err) } diff --git a/website/email.go b/website/email.go index 4e6e4bacf..b443b5d36 100644 --- a/website/email.go +++ b/website/email.go @@ -70,7 +70,7 @@ func startEmailCommitLoop(errc chan<- error) { return } if *emailNow != "" { - dir, err := osutil.GoPackagePath("camlistore.org") + dir, err := osutil.GoPackagePath(prodDomain) if err != nil { log.Fatal(err) } diff --git a/website/godoc.go b/website/godoc.go index 5e27f0195..c32b70d9c 100644 --- a/website/godoc.go +++ b/website/godoc.go @@ -42,6 +42,10 @@ import ( ) const ( + // TODO(mpl): when we move to perkeep.org in all of the website's contents, we + // change this domainName as well. However, we probably want to make godoc work for + // both perkeep.org and camlistore.org. Or maybe we don't care? plus there's + // godoc.org anyway. domainName = "camlistore.org" pkgPattern = "/pkg/" cmdPattern = "/cmd/"