feat: integrate mktools
This commit is contained in:
parent
8496a4e096
commit
000b7c8cf4
|
@ -1,4 +1,6 @@
|
||||||
/vendor
|
/vendor
|
||||||
/data
|
/data
|
||||||
/bin
|
/bin
|
||||||
/.vscode
|
/.vscode
|
||||||
|
/tools
|
||||||
|
/.mktools
|
||||||
|
|
20
Makefile
20
Makefile
|
@ -1,7 +1,7 @@
|
||||||
DOKKU_HOST := dokku@dev.lookingfora.name
|
DOKKU_HOST := dokku@dev.lookingfora.name
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
DOCKER_IMAGE_NAME ?= bornholm/oidc-test
|
DOCKER_IMAGE_NAME ?= reg.cadoles.com/cadoles/oidc-test
|
||||||
DOCKER_IMAGE_TAG ?= $(shell git describe)
|
DOCKER_IMAGE_TAG ?= $(MKT_PROJECT_VERSION)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
CGO_ENABLED=0 go build -v -o ./bin/server ./cmd/server
|
CGO_ENABLED=0 go build -v -o ./bin/server ./cmd/server
|
||||||
|
@ -39,16 +39,26 @@ dokku-deploy:
|
||||||
$(if $(shell git config remote.dokku-oidc-test.url),, git remote add dokku-oidc-test $(DOKKU_HOST):oidc-test)
|
$(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
|
git push -f dokku-oidc-test $(shell git rev-parse HEAD):refs/heads/master
|
||||||
|
|
||||||
docker-build:
|
docker-build: .mktools
|
||||||
docker build \
|
docker build \
|
||||||
-f ./misc/dokku/Dockerfile \
|
-f ./misc/dokku/Dockerfile \
|
||||||
-t $(DOCKER_IMAGE_NAME):latest \
|
-t $(DOCKER_IMAGE_NAME):latest \
|
||||||
.
|
.
|
||||||
|
|
||||||
docker-release: docker-build
|
docker-release: .mktools docker-build
|
||||||
docker image tag $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
|
docker image tag $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
|
||||||
docker login
|
docker login
|
||||||
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
|
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
|
||||||
docker push $(DOCKER_IMAGE_NAME):latest
|
docker push $(DOCKER_IMAGE_NAME):latest
|
||||||
|
|
||||||
.PHONY: lint watch build vendor tidy release
|
.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
|
Loading…
Reference in New Issue