
all: DIST/flowserver DIST/web

clean:
	rm -rf DIST

DIST:
	mkdir -p DIST

DIST/flowserver: DIST
	cd go;make
	cp go/DIST/* DIST/


browser/vue-flow/node_modules:
	cd browser/vue-flow; yarn

DIST/web: DIST browser/vue-flow/node_modules
	mkdir -p DIST/web
	cd browser/vue-flow;yarn build
	cp -r browser/vue-flow/dist/* DIST/web

DIST/.dockerized: DIST/flowserver DIST/web
	docker build --rm -t hexasoftware.com:5000/flow-proto -f ./docker/Dockerfile .
	touch DIST/.dockerized

docker: DIST/.dockerized


push: DIST/.dockerized
	docker push hexasoftware.com:5000/flow-proto

frontend: DIST/web

backend: DIST/flowserver

dev: clean backend
	tmux split "DEBUG=1 DIST/flowserver"
	cd browser/vue-flow; yarn dev

builder:
	git add -A .
	git commit -m "Droning building $$(date)"
	git push builder master




.PHONY: all clean frontend backend builder

