WIP: JSONRPC server refactoring
This commit is contained in:
19
Makefile
19
Makefile
@ -1,4 +1,5 @@
|
||||
LINT_ARGS ?= ./...
|
||||
DEPLOY_HOST ?= 192.168.100.1
|
||||
export GO111MODULE := on
|
||||
|
||||
build: bin/server
|
||||
@ -6,6 +7,10 @@ build: bin/server
|
||||
bin/server:
|
||||
CGO_ENABLED=0 go build -mod=vendor -v -o ./bin/server ./cmd/server
|
||||
|
||||
cmd/server/static/dist:
|
||||
cd cmd/server && npm install
|
||||
cd cmd/server && npm run build
|
||||
|
||||
watch:
|
||||
modd
|
||||
|
||||
@ -22,18 +27,28 @@ tidy:
|
||||
vendor: tidy
|
||||
go mod vendor
|
||||
|
||||
install-devtools: vendor
|
||||
deps:
|
||||
# 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
|
||||
|
||||
release: cmd/server/static/dist
|
||||
rm -rf release
|
||||
NODE_ENV=production ./script/release
|
||||
|
||||
clean:
|
||||
rm -rf ./bin
|
||||
go clean -i -x -r -modcache
|
||||
|
||||
deploy: release
|
||||
rsync -avzz --delete release/server-linux-arm/. root@$(DEPLOY_HOST):/opt/orion/
|
||||
scp misc/openwrt/orion.init root@$(DEPLOY_HOST):/etc/init.d/orion
|
||||
ssh root@$(DEPLOY_HOST) chmod +x /etc/init.d/orion
|
||||
ssh root@$(DEPLOY_HOST) /etc/init.d/orion restart
|
||||
|
||||
doc:
|
||||
@echo "Open your browser to http://localhost:6060/pkg/forge.cadoles.com/Pyxis/orion/ to see the documentation"
|
||||
@godoc -http=:6060
|
||||
|
||||
.PHONY: test clean generate vendor install-devtools lint watch tidy doc bin/server
|
||||
.PHONY: test clean generate vendor deps lint watch tidy doc bin/server cmd/server/static/dist release
|
Reference in New Issue
Block a user