path fixes for third_party move

A few more left in in misc/docker that I'll do separately

Related: 75d60962f6

Change-Id: Id5f6a3729e33aca97f8664ca8ef91afc64461891
This commit is contained in:
mpl 2016-04-21 12:08:14 -07:00
parent 8580b811cf
commit 63d6e384bb
13 changed files with 19 additions and 19 deletions

View File

@ -18,7 +18,6 @@ RUN chown camli.camli /gopath/pkg
RUN mkdir -p /gopath/src
ADD depcheck /gopath/src/camlistore.org/depcheck
ADD third_party /gopath/src/camlistore.org/third_party
ADD internal /gopath/src/camlistore.org/internal
ADD app /gopath/src/camlistore.org/app
ADD dev /gopath/src/camlistore.org/dev

View File

@ -7,7 +7,7 @@ all:
# On OS X with "brew install sqlite3", you need PKG_CONFIG_PATH=/usr/local/Cellar/sqlite/3.7.17/lib/pkgconfig/
full:
go install --ldflags="-X camlistore.org/pkg/buildinfo.GitInfo "`./misc/gitversion` `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` ./pkg/... ./server/... ./cmd/... ./third_party/... ./dev/...
go install --ldflags="-X camlistore.org/pkg/buildinfo.GitInfo "`./misc/gitversion` `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` ./pkg/... ./server/... ./cmd/... ./dev/...
# Workaround Go bug where the $GOPATH/pkg cache doesn't know about tag changes.

View File

@ -108,7 +108,7 @@ func (c *gaeCmd) checkSDK() error {
}
func (c *gaeCmd) mirrorSourceRoot(gaeAppDir string) error {
uiDirs := []string{"server/camlistored/ui", "third_party/closure/lib/closure", "pkg/server"}
uiDirs := []string{"server/camlistored/ui", "vendor/embed/closure/lib/closure", "pkg/server"}
for _, dir := range uiDirs {
oriPath := filepath.Join(camliSrcRoot, filepath.FromSlash(dir))
dstPath := filepath.Join(gaeAppDir, "source_root", filepath.FromSlash(dir))

View File

@ -393,14 +393,14 @@ func (c *serverCmd) setFullClosure() error {
oldsvn, err)
}
log.Println("Updating closure library...")
args := []string{"run", "third_party/closure/updatelibrary.go", "-verbose"}
args := []string{"run", "vendor/embed/closure/updatelibrary.go", "-verbose"}
cmd := exec.Command("go", args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
return fmt.Errorf("Could not run updatelibrary.go: %v", err)
}
c.env.Set("CAMLI_DEV_CLOSURE_DIR", "third_party/closure/lib/closure")
c.env.Set("CAMLI_DEV_CLOSURE_DIR", "vendor/embed/closure/lib/closure")
}
return nil
}

View File

@ -199,7 +199,6 @@ func main() {
"camlistore.org/app/...",
"camlistore.org/pkg/...",
"camlistore.org/server/...",
"camlistore.org/third_party/...",
"camlistore.org/internal/...",
)
}

View File

@ -284,5 +284,5 @@ func fakePicture() string {
if err != nil {
log.Fatalf("Error searching for \"camlistore.org\" under GOPATH: %v", err)
}
return filepath.Join(camliDir, filepath.FromSlash("third_party/glitch/npc_piggy__x1_walk_png_1354829432.png"))
return filepath.Join(camliDir, filepath.FromSlash("vendor/embed/glitch/npc_piggy__x1_walk_png_1354829432.png"))
}

View File

@ -265,5 +265,5 @@ func fakePhoto() string {
if err != nil {
log.Fatalf("Error searching for \"camlistore.org\" under GOPATH: %v", err)
}
return filepath.Join(camliDir, filepath.FromSlash("third_party/glitch/npc_piggy__x1_walk_png_1354829432.png"))
return filepath.Join(camliDir, filepath.FromSlash("vendor/embed/glitch/npc_piggy__x1_walk_png_1354829432.png"))
}

View File

@ -235,5 +235,5 @@ func fakePhoto() string {
if err != nil {
log.Fatalf("Error searching for \"camlistore.org\" under GOPATH: %v", err)
}
return filepath.Join(camliDir, filepath.FromSlash("third_party/glitch/npc_piggy__x1_walk_png_1354829432.png"))
return filepath.Join(camliDir, filepath.FromSlash("vendor/embed/glitch/npc_piggy__x1_walk_png_1354829432.png"))
}

View File

@ -263,5 +263,5 @@ func fakePicture() string {
if err != nil {
log.Fatalf("Error searching for \"camlistore.org\" under GOPATH: %v", err)
}
return filepath.Join(camliDir, filepath.FromSlash("third_party/glitch/npc_piggy__x1_walk_png_1354829432.png"))
return filepath.Join(camliDir, filepath.FromSlash("vendor/embed/glitch/npc_piggy__x1_walk_png_1354829432.png"))
}

View File

@ -118,7 +118,7 @@ func TestCwd(t *testing.T) {
if err != nil {
t.Fatalf("Could not find repository root: %v", err)
}
baseJS := filepath.Join(repoRoot, "third_party", "closure", "lib", "closure", "goog", "base.js")
baseJS := filepath.Join(repoRoot, "vendor", "embed", "closure", "lib", "closure", "goog", "base.js")
bootstrap := filepath.Join(filepath.Dir(baseJS), "bootstrap", "nodejs.js")
depsFile, err := writeDeps(baseJS, path)
if err != nil {

View File

@ -70,6 +70,8 @@ var (
glitchPattern = regexp.MustCompile(`^glitch/(.+)$`)
disableThumbCache, _ = strconv.ParseBool(os.Getenv("CAMLI_DISABLE_THUMB_CACHE"))
vendorEmbed = filepath.Join("vendor", "embed")
)
// UIHandler handles serving the UI and discovery JSON.
@ -183,19 +185,19 @@ func uiFromConfig(ld blobserver.Loader, conf jsonconfig.Obj) (h http.Handler, er
}
if ui.sourceRoot != "" {
ui.fileReactHandler, err = makeFileServer(ui.sourceRoot, filepath.Join("third_party", "react"), "react.js")
ui.fileReactHandler, err = makeFileServer(ui.sourceRoot, filepath.Join(vendorEmbed, "react"), "react.js")
if err != nil {
return nil, fmt.Errorf("Could not make react handler: %s", err)
}
ui.fileGlitchHandler, err = makeFileServer(ui.sourceRoot, filepath.Join("third_party", "glitch"), "npc_piggy__x1_walk_png_1354829432.png")
ui.fileGlitchHandler, err = makeFileServer(ui.sourceRoot, filepath.Join(vendorEmbed, "glitch"), "npc_piggy__x1_walk_png_1354829432.png")
if err != nil {
return nil, fmt.Errorf("Could not make glitch handler: %s", err)
}
ui.fileFontawesomeHandler, err = makeFileServer(ui.sourceRoot, filepath.Join("third_party", "fontawesome"), "css/font-awesome.css")
ui.fileFontawesomeHandler, err = makeFileServer(ui.sourceRoot, filepath.Join(vendorEmbed, "fontawesome"), "css/font-awesome.css")
if err != nil {
return nil, fmt.Errorf("Could not make fontawesome handler: %s", err)
}
ui.fileLessHandler, err = makeFileServer(ui.sourceRoot, filepath.Join("third_party", "less"), "less.js")
ui.fileLessHandler, err = makeFileServer(ui.sourceRoot, filepath.Join(vendorEmbed, "less"), "less.js")
if err != nil {
return nil, fmt.Errorf("Could not make less handler: %s", err)
}
@ -325,7 +327,7 @@ func makeClosureHandler(root, handlerName string) (http.Handler, error) {
return closureRedirector(root), nil
}
path := filepath.Join("third_party", "closure", "lib", "closure")
path := filepath.Join(vendorEmbed, "closure", "lib", "closure")
return makeFileServer(root, path, filepath.Join("goog", "base.js"))
}

View File

@ -36,7 +36,7 @@ type Config struct {
// alternative source tree, to override the embedded ui and/or closure resources.
// If non empty, the ui files will be expected at
// sourceRoot + "/server/camlistored/ui" and the closure library at
// sourceRoot + "/third_party/closure/lib"
// sourceRoot + "/vendor/embed/closure/lib"
// Also used by the publish handler.
SourceRoot string `json:"sourceRoot,omitempty"`
OwnerName string `json:"ownerName,omitempty"`

View File

@ -52,7 +52,7 @@ var (
var (
verbose bool
closureGitDir string // where we do the cloning/updating: camliRoot + tmp/closure-lib/
destDir string // install dir: camliRoot + third_party/closure/lib/
destDir string // install dir: camliRoot + vendor/embed/closure/lib/
)
func init() {
@ -269,7 +269,7 @@ func setup() string {
if err != nil {
log.Fatal("Package camlistore.org not found in $GOPATH (or $GOPATH not defined).")
}
destDir = filepath.Join(camliRootPath, "third_party", "closure", "lib")
destDir = filepath.Join(camliRootPath, "vendor", "embed", "closure", "lib")
closureGitDir = filepath.Join(camliRootPath, "tmp", "closure-lib")
op := "update"
_, err = os.Stat(closureGitDir)