goweb-oidc/Makefile

64 lines
1.3 KiB
Makefile
Raw Normal View History

2020-05-20 19:29:13 +02:00
DOKKU_HOST := dokku@dev.lookingfora.name
SHELL := /bin/bash
2023-11-02 18:46:46 +01:00
DOCKER_IMAGE_NAME ?= reg.cadoles.com/cadoles/oidc-test
DOCKER_IMAGE_TAG ?= $(MKT_PROJECT_VERSION)
2020-05-20 10:43:12 +02:00
2020-05-20 19:29:13 +02:00
build:
2020-10-13 10:59:41 +02:00
CGO_ENABLED=0 go build -v -o ./bin/server ./cmd/server
2020-05-20 10:43:12 +02:00
test:
go test -v -race ./...
2020-10-13 10:59:41 +02:00
release:
2020-05-20 10:43:12 +02:00
@$(SHELL) ./misc/script/release.sh
tidy:
go mod tidy
watch:
modd
lint:
golangci-lint run --enable-all
clean:
rm -rf release
rm -rf data
rm -rf bin
2020-05-20 19:29:13 +02:00
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
2023-11-02 18:46:46 +01:00
docker-build: .mktools
2022-04-20 15:30:50 +02:00
docker build \
-f ./misc/dokku/Dockerfile \
-t $(DOCKER_IMAGE_NAME):latest \
.
2023-11-02 18:46:46 +01:00
docker-release: .mktools docker-build
2022-04-20 15:30:50 +02:00
docker image tag $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
docker login
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
docker push $(DOCKER_IMAGE_NAME):latest
2023-11-02 18:46:46 +01:00
.PHONY: lint watch build vendor tidy release
.PHONY: mktools
mktools:
rm -rf .mktools
curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL)
.mktools:
$(MAKE) mktools
-include .mktools/*.mk