mirror of https://github.com/perkeep/perkeep.git
Merge "genfileembed: always embed paths with slashes"
This commit is contained in:
commit
527d42eb03
6
make.go
6
make.go
|
@ -891,7 +891,11 @@ func genEmbeds() error {
|
||||||
}
|
}
|
||||||
for _, embeds := range []string{"server/camlistored/ui", "pkg/server", "vendor/embed/react", "vendor/embed/less", "vendor/embed/glitch", "vendor/embed/fontawesome", "vendor/embed/leaflet", "app/publisher", "app/scanningcabinet/ui"} {
|
for _, embeds := range []string{"server/camlistored/ui", "pkg/server", "vendor/embed/react", "vendor/embed/less", "vendor/embed/glitch", "vendor/embed/fontawesome", "vendor/embed/leaflet", "app/publisher", "app/scanningcabinet/ui"} {
|
||||||
embeds := buildSrcPath(embeds)
|
embeds := buildSrcPath(embeds)
|
||||||
args := []string{"--output-files-stderr", embeds}
|
var args []string
|
||||||
|
if *all {
|
||||||
|
args = append(args, "-all")
|
||||||
|
}
|
||||||
|
args = append(args, "-output-files-stderr", embeds)
|
||||||
cmd := exec.Command(cmdName, args...)
|
cmd := exec.Command(cmdName, args...)
|
||||||
cmd.Env = append(cleanGoEnv(),
|
cmd.Env = append(cleanGoEnv(),
|
||||||
"GOPATH="+buildGoPath,
|
"GOPATH="+buildGoPath,
|
||||||
|
|
|
@ -163,7 +163,7 @@ func main() {
|
||||||
fmt.Fprintf(&b, "import \""+*fileEmbedPkgPath+"\"\n\n")
|
fmt.Fprintf(&b, "import \""+*fileEmbedPkgPath+"\"\n\n")
|
||||||
b.WriteString(imports)
|
b.WriteString(imports)
|
||||||
fmt.Fprintf(&b, "func init() {\n\tFiles.Add(%q, %d, time.Unix(0, %d), %s(%s));\n}\n",
|
fmt.Fprintf(&b, "func init() {\n\tFiles.Add(%q, %d, time.Unix(0, %d), %s(%s));\n}\n",
|
||||||
fileName, fileSize, fi.ModTime().UnixNano(), byteStreamType, qb)
|
filepath.ToSlash(fileName), fileSize, fi.ModTime().UnixNano(), byteStreamType, qb)
|
||||||
|
|
||||||
// gofmt it
|
// gofmt it
|
||||||
fset := token.NewFileSet()
|
fset := token.NewFileSet()
|
||||||
|
|
Loading…
Reference in New Issue