forked from JervenBolleman/sparql-identifiers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (27 loc) · 1.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This Makefile helps on building the production container image
container_name = identifiersorg/sparql-identifiers
tag_version = $(shell cat VERSION)
release: set_next_development_version
@echo "<===|DEVOPS|===> [RELEASE] Software Release, preparing next development version"
@git add pom.xml
@git commit -am "Next project development version prepared"
@git push
sync_project_version:
@echo "<===|DEVOPS|===> [SYNC] Synchronizing project version to version '${tag_version}'"
@mvn versions:set -DnewVersion=${tag_version} -DgenerateBackupPoms=false
set_next_development_version:
@echo "<===|DEVOPS|===> [SYNC] Setting the new development version, current ${tag_version}"
@mvn versions:set -DnewVersion=$(shell ./increment_version.sh -p ${tag_version})-SNAPSHOT
container_production_build:
@echo "<===|DEVOPS|===> [BUILD] Production container $(container_name):$(tag_version)"
@docker build -t $(container_name):$(tag_version) -t $(container_name):latest .
container_production_push: container_production_build
@echo "<===|DEVOPS|===> [PUBLISH]> Production container $(container_name):$(tag_version)"
@docker push $(container_name):$(tag_version)
@docker push $(container_name):latest
dev_container_build: clean container_production_build
@echo "<===|DEVOPS|===> [DEV] Preparing local container"
clean:
@echo "<===|DEVOPS|===> [CLEAN] Cleaning the space"
@mvn clean > /dev/null
.PHONY: all clean app_structure container_production_build container_production_push dev_container_build deploy release sync_project_version set_next_development_version