mirror of https://github.com/perkeep/perkeep.git
make.go: just build website with -website
That should make it easier to catch missing dependencies. Because 'go run make.go -website' will ignore whatever's in your GOPATH, and only use what's in our vendor. Change-Id: I94648633a9fa69a5742b7e83031dab34470b9cde
This commit is contained in:
parent
e305847941
commit
bc4dbb0b5a
19
make.go
19
make.go
|
@ -63,6 +63,7 @@ var (
|
|||
buildOS = flag.String("os", runtime.GOOS, "Operating system to build for.")
|
||||
buildARM = flag.String("arm", "7", "ARM version to use if building for ARM. Note that this version applies even if the host arch is ARM too (and possibly of a different version).")
|
||||
stampVersion = flag.Bool("stampversion", true, "Stamp version into buildinfo.GitInfo")
|
||||
website = flag.Bool("website", false, "Just build the website.")
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -112,6 +113,9 @@ func main() {
|
|||
}
|
||||
latestSrcMod = mirror(sql)
|
||||
if *onlysync {
|
||||
if *website {
|
||||
log.Fatal("-onlysync and -website are mutually exclusive")
|
||||
}
|
||||
mirrorFile("make.go", filepath.Join(buildSrcDir, "make.go"))
|
||||
// Since we have not done the resources embedding, the
|
||||
// z_*.go files have not been marked as wanted and are
|
||||
|
@ -156,10 +160,17 @@ func main() {
|
|||
targs = append(targs, "camlistore.org/cmd/cammount")
|
||||
}
|
||||
default:
|
||||
if *website {
|
||||
log.Fatal("-targets and -website are mutually exclusive")
|
||||
}
|
||||
if t := strings.Split(*targets, ","); len(t) != 0 {
|
||||
targs = t
|
||||
}
|
||||
}
|
||||
if *website {
|
||||
buildAll = false
|
||||
targs = []string{"camlistore.org/website"}
|
||||
}
|
||||
|
||||
withCamlistored := stringListContains(targs, "camlistore.org/server/camlistored")
|
||||
if *embedResources && withCamlistored {
|
||||
|
@ -206,7 +217,6 @@ func main() {
|
|||
cmd := exec.Command("go", args...)
|
||||
cmd.Env = append(cleanGoEnv(),
|
||||
"GOPATH="+buildGoPath,
|
||||
"GO15VENDOREXPERIMENT=1",
|
||||
)
|
||||
|
||||
if *verbose {
|
||||
|
@ -286,6 +296,13 @@ func mirror(sql bool) (latestSrcMod time.Time) {
|
|||
if *onlysync {
|
||||
goDirs = append(goDirs, "server/appengine", "config", "misc", "./website")
|
||||
}
|
||||
if *website {
|
||||
goDirs = []string{
|
||||
"pkg",
|
||||
"vendor",
|
||||
"website",
|
||||
}
|
||||
}
|
||||
// Copy files we do want in our mirrored GOPATH. This has the side effect of
|
||||
// populating wantDestFile, populated by mirrorFile.
|
||||
for _, dir := range goDirs {
|
||||
|
|
Loading…
Reference in New Issue