Use go generate for Packr2 and GraphQL files

This commit is contained in:
Friendly C 2019-07-11 18:57:50 +02:00
parent 56d010144e
commit 4627db8ade
5 changed files with 7 additions and 14 deletions

View File

@ -17,7 +17,7 @@ before_install:
script:
#- make lint
#- make vet
- make gqlgen
- make generate
- go test
before_deploy:
- docker pull stashappdev/compiler

View File

@ -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.

View File

@ -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

View File

@ -1,3 +1,5 @@
//go:generate go run github.com/99designs/gqlgen
//go:generate packr2
package main
import (

View File

@ -1,9 +0,0 @@
// +build ignore
package main
import "github.com/99designs/gqlgen/cmd"
func main() {
cmd.Execute()
}