updated static files generation handling
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
48e1aeb067
commit
d99c6c9959
@ -30,9 +30,9 @@ build() {
|
||||
|
||||
echo "Getting packr2 and building embedded files"
|
||||
go get -u github.com/gobuffalo/packr/v2/packr2
|
||||
packr2
|
||||
|
||||
echo "Building project"
|
||||
go generate ${SRCFILES}
|
||||
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
|
||||
|
||||
if [[ ! -z $DRONE_TAG ]]
|
||||
|
@ -1,13 +1,15 @@
|
||||
//go:generate packr2 -v
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
_ "git.paulbsd.com/paulbsd/qrz/packrd"
|
||||
"git.paulbsd.com/paulbsd/qrz/src/config"
|
||||
"git.paulbsd.com/paulbsd/qrz/src/database"
|
||||
"git.paulbsd.com/paulbsd/qrz/src/qrz"
|
||||
"git.paulbsd.com/paulbsd/qrz/src/qrzws"
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
@ -18,6 +20,8 @@ func main() {
|
||||
cfg.GetConfig()
|
||||
cfg.Version = version
|
||||
|
||||
PackrGen()
|
||||
|
||||
err := database.Initialize(&cfg)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
@ -34,3 +38,8 @@ func main() {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
||||
func PackrGen() {
|
||||
packr.New("static", "../../static")
|
||||
packr.New("templates", "../../templates")
|
||||
}
|
||||
|
10
packr.go
10
packr.go
@ -1,10 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
packr.New("static", "./static")
|
||||
packr.New("templates", "./templates")
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
//go:generate packr2 -v
|
||||
|
||||
package qrzws
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:generate packr2 -v
|
||||
|
||||
package static
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:generate packr2 -v
|
||||
|
||||
package templates
|
||||
|
||||
import (
|
||||
|
Loading…
Reference in New Issue
Block a user