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:
|
script:
|
||||||
#- make lint
|
#- make lint
|
||||||
#- make vet
|
#- make vet
|
||||||
- make gqlgen
|
- make generate
|
||||||
- go test
|
- go test
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- docker pull stashappdev/compiler
|
- docker pull stashappdev/compiler
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -13,9 +13,9 @@ clean:
|
||||||
packr2 clean
|
packr2 clean
|
||||||
|
|
||||||
# Regenerates GraphQL files
|
# Regenerates GraphQL files
|
||||||
.PHONY: gqlgen
|
.PHONY: generate
|
||||||
gqlgen:
|
generate:
|
||||||
go run scripts/gqlgen.go
|
go generate
|
||||||
cd ui/v2 && yarn run gqlgen
|
cd ui/v2 && yarn run gqlgen
|
||||||
|
|
||||||
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
|
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
|
||||||
|
|
|
@ -88,8 +88,8 @@ TODO
|
||||||
|
|
||||||
## Commands
|
## 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 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 vet` - Run `go vet`
|
||||||
* `make lint` - Run the linter
|
* `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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
// +build ignore
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import "github.com/99designs/gqlgen/cmd"
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cmd.Execute()
|
|
||||||
}
|
|
Loading…
Reference in New Issue