Files
go-ssb-room/web/embedded_generate.go
Henry fec92d428c change name to go-ssb-room
It has been brought to my attention that "gossb" reads like "gossip..?"
to the untrained eye. That's just confusing.

Also the project hosts a single room so the plural was just wrong.
2021-02-09 17:38:51 +01:00

48 lines
878 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// SPDX-License-Identifier: MIT
// +build ignore
package main
import (
"log"
"os/exec"
"github.com/shurcooL/vfsgen"
"github.com/ssb-ngi-pointer/go-ssb-room/web"
)
func main() {
err := vfsgen.Generate(web.Templates, vfsgen.Options{
PackageName: "web",
BuildTags: "!dev",
VariableName: "Templates",
})
if err != nil {
log.Fatalln(err)
}
err = vfsgen.Generate(web.Assets, vfsgen.Options{
PackageName: "web",
BuildTags: "!dev",
VariableName: "Assets",
})
if err != nil {
log.Fatalln(err)
}
// nasty hack to strip duplicate type information
// https://github.com/shurcooL/vfsgen/issues/23
err = exec.Command("sed", "-i", "/^type vfsgen۰FS/,$d", "assets_vfsdata.go").Run()
if err != nil {
log.Fatalln(err)
}
// clean up the unused imports
err = exec.Command("goimports", "-w", ".").Run()
if err != nil {
log.Fatalln(err)
}
}