.PHONY: all build frontend clean test run build-linux build-windows

all: frontend build

frontend:
	cd web && npm install && npm run build

build:
	go build -o bin/gitm .

clean:
	rm -rf bin/ web/dist/ web/node_modules/

test:
	go test -v ./...

run:
	go run main.go

build-linux:
	GOOS=linux GOARCH=amd64 go build -o bin/gitm-linux .

build-windows:
	GOOS=windows GOARCH=amd64 go build -o bin/gitm.exe .
