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