update
This commit is contained in:
parent
5591f145a9
commit
d8ee8a3a24
166 changed files with 15431 additions and 889 deletions
43
Makefile
43
Makefile
|
@ -1,40 +1,7 @@
|
|||
#-include .env
|
||||
generate-graphql: src/delivery/graphql/generated.go ui/lib/api/schema.graphql
|
||||
|
||||
VERSION := $(shell git describe --tags)
|
||||
BUILD := $(shell git rev-parse --short HEAD)
|
||||
BIN_OUTPUT ?= bin/tstor-$(VERSION)-`go env GOOS`-`go env GOARCH``go env GOEXE`
|
||||
PROJECTNAME := $(shell basename "$(PWD)")
|
||||
|
||||
# Use linker flags to provide version/build settings
|
||||
LDFLAGS=-X=main.Version=$(VERSION) -X=main.Build=$(BUILD) -linkmode external
|
||||
|
||||
# Make is verbose in Linux. Make it silent.
|
||||
MAKEFLAGS += --silent
|
||||
|
||||
## run: run from code.
|
||||
run:
|
||||
go run cmd/tstor/main.go examples/conf_example.yaml
|
||||
|
||||
## build: build binary.
|
||||
build: go-generate go-build
|
||||
|
||||
## test-race: execute all tests with race enabled.
|
||||
test-race:
|
||||
go test -v --race -coverprofile=coverage.out ./...
|
||||
|
||||
## test: execute all tests
|
||||
test:
|
||||
go test -v -coverprofile=coverage.out ./...
|
||||
|
||||
go-build:
|
||||
@echo " > Building binary on $(BIN_OUTPUT)..."
|
||||
go build -o $(BIN_OUTPUT) -tags "release" -ldflags='$(LDFLAGS)' cmd/tstor/main.go
|
||||
|
||||
go-generate:
|
||||
@echo " > Generating code files..."
|
||||
go generate ./...
|
||||
|
||||
generate-graphql: src/delivery/graph/generated.go
|
||||
|
||||
src/delivery/graph/generated.go: .gqlgen.yml graphql/* graphql/types/* cmd/generate-graphql/*
|
||||
src/delivery/graphql/generated.go: .gqlgen.yml graphql/* graphql/types/* cmd/generate-graphql/*
|
||||
go run cmd/generate-graphql/main.go
|
||||
|
||||
ui/lib/api/schema.graphql: src/delivery/graphql/* cmd/generate-graphql-schema/*
|
||||
go run cmd/generate-graphql-schema/main.go $@
|
Loading…
Add table
Add a link
Reference in a new issue