]> git.r.bdr.sh - rbdr/dasein/blame_incremental - Makefile
Merge branch 'release/1.0.0'
[rbdr/dasein] / Makefile
... / ...
CommitLineData
1
2# Never directly modify the default environment
3environment = development
4
5repo_full_name = $(shell git remote -v | grep origin | grep push | grep -o '[^:/]\+\/[^/]\+\s\+' | grep -o '[^:]\+\/[^. ]\+')
6git_sha = $(shell git rev-parse --short HEAD)
7git_branch = $(shell git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3)
8whoami = $(shell whoami)
9
10default: build
11
12build: docker-build
13
14run: build
15 docker-compose up
16
17package: build
18
19upload: build
20 docker push $(repo_full_name)
21
22clean: clean-docker-build
23
24test_ci:
25 docker-compose --project-name ci_build -f test/docker-compose-ci.yml run dasein
26
27docker-build:
28 docker build --force-rm -t $(repo_full_name):$(git_sha) .
29 docker tag $(repo_full_name):$(git_sha) $(repo_full_name):latest
30
31# Dashes before the commands below indicate a non-zero exit status is okay.
32clean-docker-build:
33 -docker rm $(repo_full_name):$(git_sha)
34 -docker rmi $(repo_full_name):$(git_sha)