diff --git a/.travis.yml b/.travis.yml index 5a2824fc4..02b7a25a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_install: script: #- make lint #- make vet -- make gqlgen +- make generate - go test before_deploy: - docker pull stashappdev/compiler diff --git a/Makefile b/Makefile index ef6a0ca91..582a6fa19 100644 --- a/Makefile +++ b/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. diff --git a/README.md b/README.md index 3ae39610d..109e95cf7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/main.go b/main.go index f1d0d31ca..bff1b8e1a 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,5 @@ +//go:generate go run github.com/99designs/gqlgen +//go:generate packr2 package main import ( diff --git a/scripts/gqlgen.go b/scripts/gqlgen.go deleted file mode 100644 index 15a43e973..000000000 --- a/scripts/gqlgen.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build ignore - -package main - -import "github.com/99designs/gqlgen/cmd" - -func main() { - cmd.Execute() -} \ No newline at end of file