stash/Makefile

41 lines
837 B
Makefile
Raw Normal View History

ifeq ($(OS),Windows_NT)
SEPARATOR := &&
SET := set
endif
2019-02-09 12:30:49 +00:00
build:
$(eval DATE := $(shell go run scripts/getDate.go))
$(eval GITHASH := $(shell git rev-parse --short HEAD))
$(SET) CGO_ENABLED=1 $(SEPARATOR) go build -mod=vendor -v -ldflags "-X 'github.com/stashapp/stash/pkg/api.buildstamp=$(DATE)' -X 'github.com/stashapp/stash/pkg/api.githash=$(GITHASH)'"
2019-02-10 12:16:29 +00:00
install:
packr2 install
clean:
packr2 clean
# Regenerates GraphQL files
.PHONY: generate
generate:
go generate
2019-08-01 01:46:33 +00:00
cd ui/v2 && yarn run gqlgen
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
.PHONY: fmt
fmt:
2019-07-28 03:54:27 +00:00
go fmt ./...
# Runs go vet on the project's source code.
.PHONY: vet
vet:
2019-07-28 03:54:27 +00:00
go vet ./...
.PHONY: lint
lint:
revive -config revive.toml -exclude ./vendor/... ./...
.PHONY: ui
ui:
cd ui/v2 && yarn build
packr2