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"
|
echo "Getting packr2 and building embedded files"
|
||||||
go get -u github.com/gobuffalo/packr/v2/packr2
|
go get -u github.com/gobuffalo/packr/v2/packr2
|
||||||
packr2
|
|
||||||
|
|
||||||
echo "Building project"
|
echo "Building project"
|
||||||
|
go generate ${SRCFILES}
|
||||||
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
|
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
|
||||||
|
|
||||||
if [[ ! -z $DRONE_TAG ]]
|
if [[ ! -z $DRONE_TAG ]]
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
|
//go:generate packr2 -v
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
_ "git.paulbsd.com/paulbsd/qrz/packrd"
|
|
||||||
"git.paulbsd.com/paulbsd/qrz/src/config"
|
"git.paulbsd.com/paulbsd/qrz/src/config"
|
||||||
"git.paulbsd.com/paulbsd/qrz/src/database"
|
"git.paulbsd.com/paulbsd/qrz/src/database"
|
||||||
"git.paulbsd.com/paulbsd/qrz/src/qrz"
|
"git.paulbsd.com/paulbsd/qrz/src/qrz"
|
||||||
"git.paulbsd.com/paulbsd/qrz/src/qrzws"
|
"git.paulbsd.com/paulbsd/qrz/src/qrzws"
|
||||||
|
"github.com/gobuffalo/packr/v2"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,6 +20,8 @@ func main() {
|
|||||||
cfg.GetConfig()
|
cfg.GetConfig()
|
||||||
cfg.Version = version
|
cfg.Version = version
|
||||||
|
|
||||||
|
PackrGen()
|
||||||
|
|
||||||
err := database.Initialize(&cfg)
|
err := database.Initialize(&cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
@ -34,3 +38,8 @@ func main() {
|
|||||||
log.Fatalln(err)
|
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
|
package qrzws
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//go:generate packr2 -v
|
||||||
|
|
||||||
package static
|
package static
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//go:generate packr2 -v
|
||||||
|
|
||||||
package templates
|
package templates
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Loading…
Reference in New Issue
Block a user