server.build:
	clear
	go fmt ./...
	go build -o ./bin/server ./cmd/server/main.go
	strip -s ./bin/server
	upx -f ./bin/server
desktop.build:
	clear
	go fmt ./...
	go build -o ./bin/desktop ./cmd/desktop/main.go
	strip -s ./bin/desktop
	upx -f ./bin/desktop
pwa.build:
	clear
	go fmt ./...
	go build -o ./bin/pwa ./cmd/pwa/main.go
	strip -s ./bin/pwa
	upx -f ./bin/pwa
	GOARCH=wasm GOOS=js go build -o ./bin/web/app.wasm ./cmd/pwa/main.go
runner.build:
	clear
	go fmt ./...
	go build -o ./bin/serv_run ./cmd/serv_run/main.go
	strip -s ./bin/serv_run
	upx -f ./bin/serv_run
server.run:
	clear
	go fmt ./...
	go build -o ./bin/server_dev ./cmd/server/main.go
	./run_server.sh
desktop.run:
	clear
	go fmt ./...
	go build -race -o ./bin/desktop-race ./cmd/desktop/main.go
	./run_desktop.sh
pwa.run:
	clear
	go fmt ./...
	go build -race -o ./bin/pwa-race ./cmd/pwa/main.go
	GOARCH=wasm GOOS=js go build -o ./bin/web/app.wasm ./cmd/pwa/main.go
	cd ./bin && \
	./pwa-race
test.run:
	clear
	go fmt ./...
	go test --cover -coverprofile=coverage.txt ./cmd/... ./internal/... ./pkg/...
	go tool cover -func=coverage.txt
mod:
	clear
	go mod tidy
	go mod vendor
	go fmt ./...
lint:
	clear
	go fmt ./...
	golangci-lint run ./cmd/serv_old/...
	golangci-lint run ./cmd/client_pwa/...
	golangci-lint run ./internal/...
