This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/Makefile

46 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

LINT_ARGS ?= ./...
2018-09-17 14:17:54 +02:00
export GO111MODULE := on
build: bin/server
2018-09-18 18:07:40 +02:00
bin/server:
CGO_ENABLED=0 go build -mod=vendor -v -o ./bin/server ./cmd/server
2018-09-17 14:17:54 +02:00
watch:
modd
2018-09-18 18:07:40 +02:00
test: tidy
GO111MODULE=off go clean -testcache
go test -mod=vendor -v ./...
2018-09-17 14:17:54 +02:00
lint:
2020-11-23 11:17:00 +01:00
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.32.2
go run github.com/golangci/golangci-lint/cmd/golangci-lint run -e '.*/pkg/mod' -e ".*/go/src" --enable-all --disable lll $(LINT_ARGS)
2018-09-17 14:17:54 +02:00
2018-09-18 18:07:40 +02:00
tidy:
2018-09-17 14:17:54 +02:00
go mod tidy
2018-09-18 18:07:40 +02:00
vendor: tidy
go mod vendor
2018-09-17 14:17:54 +02:00
install-devtools: vendor
# Install modd
GO111MODULE=off go get -u github.com/cortesi/modd/cmd/modd
# Install golangci-lint
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
2018-09-17 14:17:54 +02:00
clean:
rm -rf ./bin ./release
2018-09-17 14:17:54 +02:00
go clean -i -x -r -modcache
2018-09-19 17:23:28 +02:00
doc:
@echo "Open your browser to http://localhost:6060/pkg/forge.cadoles.com/Pyxis/orion/ to see the documentation"
@godoc -http=:6060
release:
scripts/release
2020-11-23 11:15:30 +01:00
spy-websocket:
echo > websocket.log && sudo tshark -Y websocket.payload -Tfields -e text | tee -a websocket.log
.PHONY: test clean generate vendor install-devtools lint watch tidy doc release