mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Add SQLite persistence, import-snapshot tool, and karma functionality
This commit is contained in:
+20
-1
@@ -7,4 +7,23 @@ proto:
|
||||
protoc -I . $(PROTO_USED) --go_out=. --go_opt=module=lunar-tear/server --go-grpc_out=. --go-grpc_opt=module=lunar-tear/server
|
||||
@echo "Generated in gen/proto/"
|
||||
|
||||
.PHONY: proto
|
||||
build:
|
||||
go build -o lunar-tear ./cmd/lunar-tear
|
||||
|
||||
build-import:
|
||||
go build -o import-snapshot ./cmd/import-snapshot
|
||||
|
||||
migrate:
|
||||
mkdir -p db
|
||||
goose -dir migrations sqlite3 db/game.db up
|
||||
|
||||
import:
|
||||
ifndef SNAPSHOT
|
||||
$(error SNAPSHOT is required, e.g. make import SNAPSHOT=snapshots/scene_1.json UUID=...)
|
||||
endif
|
||||
ifndef UUID
|
||||
$(error UUID is required, e.g. make import SNAPSHOT=snapshots/scene_1.json UUID=...)
|
||||
endif
|
||||
go run ./cmd/import-snapshot --snapshot $(SNAPSHOT) --uuid $(UUID)
|
||||
|
||||
.PHONY: proto build build-import migrate import
|
||||
|
||||
Reference in New Issue
Block a user