44 lines
794 B
Makefile
44 lines
794 B
Makefile
DOKKU_HOST := dokku@dev.lookingfora.name
|
|
SHELL := /bin/bash
|
|
|
|
build:
|
|
CGO_ENABLED=0 go build -mod=vendor -v -o ./bin/server ./cmd/server
|
|
|
|
test:
|
|
go test -v -race ./...
|
|
|
|
release: vendor
|
|
@$(SHELL) ./misc/script/release.sh
|
|
|
|
vendor:
|
|
go mod vendor
|
|
|
|
tidy:
|
|
go mod tidy
|
|
|
|
watch:
|
|
modd
|
|
|
|
lint:
|
|
golangci-lint run --enable-all
|
|
|
|
clean:
|
|
rm -rf release
|
|
rm -rf data
|
|
rm -rf vendor
|
|
rm -rf bin
|
|
|
|
dokku-build:
|
|
docker build \
|
|
-f ./misc/dokku/Dockerfile \
|
|
-t goweb-oidc-dokku:latest \
|
|
.
|
|
|
|
dokku-run:
|
|
docker run -it --rm -p 3002:3002 goweb-oidc-dokku:latest
|
|
|
|
dokku-deploy:
|
|
$(if $(shell git config remote.dokku-oidc-test.url),, git remote add dokku-oidc-test $(DOKKU_HOST):oidc-test)
|
|
git push -f dokku-oidc-test $(shell git rev-parse HEAD):refs/heads/master
|
|
|
|
.PHONY: lint watch build vendor tidy release |