mirror of https://github.com/stashapp/stash.git
Use go generate for Packr2 and GraphQL files
This commit is contained in:
parent
56d010144e
commit
4627db8ade
|
@ -17,7 +17,7 @@ before_install:
|
|||
script:
|
||||
#- make lint
|
||||
#- make vet
|
||||
- make gqlgen
|
||||
- make generate
|
||||
- go test
|
||||
before_deploy:
|
||||
- docker pull stashappdev/compiler
|
||||
|
|
6
Makefile
6
Makefile
|
@ -13,9 +13,9 @@ clean:
|
|||
packr2 clean
|
||||
|
||||
# Regenerates GraphQL files
|
||||
.PHONY: gqlgen
|
||||
gqlgen:
|
||||
go run scripts/gqlgen.go
|
||||
.PHONY: generate
|
||||
generate:
|
||||
go generate
|
||||
cd ui/v2 && yarn run gqlgen
|
||||
|
||||
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
|
||||
|
|
|
@ -88,8 +88,8 @@ TODO
|
|||
|
||||
## Commands
|
||||
|
||||
* `make generate` - Regenerate Go GraphQL and packr2 files
|
||||
* `make build` - Builds the binary (make sure to build the UI as well... see below)
|
||||
* `make gqlgen` - Regenerate Go GraphQL files
|
||||
* `make vet` - Run `go vet`
|
||||
* `make lint` - Run the linter
|
||||
|
||||
|
|
2
main.go
2
main.go
|
@ -1,3 +1,5 @@
|
|||
//go:generate go run github.com/99designs/gqlgen
|
||||
//go:generate packr2
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
import "github.com/99designs/gqlgen/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
}
|
Loading…
Reference in New Issue