2020-04-20 12:36:47 +02:00
|
|
|
DOKKU_URL := dokku@dev.lookingfora.name:guesstimate
|
|
|
|
|
2020-04-20 14:07:26 +02:00
|
|
|
watch:
|
2020-04-27 22:43:42 +02:00
|
|
|
modd
|
2020-04-20 14:07:26 +02:00
|
|
|
|
2020-05-12 13:47:46 +02:00
|
|
|
deps:
|
2020-04-27 22:43:42 +02:00
|
|
|
cd client && npm install
|
2020-05-12 13:47:46 +02:00
|
|
|
cd server && go mod vendor
|
2020-04-27 22:43:42 +02:00
|
|
|
|
|
|
|
build: clean build-server build-client
|
|
|
|
|
|
|
|
build-client:
|
|
|
|
cd client && npm run build
|
|
|
|
|
|
|
|
build-server:
|
|
|
|
cd server && CGO_ENABLED=0 go build -mod=vendor -v -o bin/server ./cmd/server
|
2020-04-20 14:07:26 +02:00
|
|
|
|
2020-04-22 22:07:52 +02:00
|
|
|
clean:
|
2020-05-03 19:19:28 +02:00
|
|
|
rm -rf client/dist server/bin release
|
2020-04-22 22:07:52 +02:00
|
|
|
|
2020-04-20 12:24:17 +02:00
|
|
|
dokku-build:
|
|
|
|
docker build \
|
|
|
|
-t guesstimate-dokku:latest \
|
|
|
|
.
|
|
|
|
|
|
|
|
dokku-run:
|
2020-04-20 12:36:47 +02:00
|
|
|
docker run -it --rm -p 8080:80 guesstimate-dokku:latest
|
|
|
|
|
|
|
|
dokku-deploy:
|
|
|
|
$(if $(shell git config remote.dokku.url),, git remote add dokku $(DOKKU_URL))
|
2020-05-03 19:19:28 +02:00
|
|
|
git push -f dokku $(shell git rev-parse HEAD):refs/heads/master
|
|
|
|
|
|
|
|
.PHONY: release
|
|
|
|
release: clean
|
|
|
|
@misc/script/release.sh
|