-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
138 lines (124 loc) · 3.66 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#
# Copyright 2018, TOTVS S.A.
# All rights reserved.
#
SHELL = /bin/bash
# Rule "pom"
.PHONY: pom
pom:
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" > pom.xml
@echo "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" >> pom.xml
@echo " xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">" >> pom.xml
@echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
@echo " <groupId>com.fluig</groupId>" >> pom.xml
@echo " <artifactId>fluig-nextgen</artifactId>" >> pom.xml
@echo " <version>1.0.0-SNAPSHOT</version>" >> pom.xml
@echo " <packaging>pom</packaging>" >> pom.xml
@echo " <name>Fluig Next Gen</name>" >> pom.xml
@echo " <description>Fluig Next Gen</description>" >> pom.xml
@echo " <properties>" >> pom.xml
@echo " <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>" >> pom.xml
@echo " <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>" >> pom.xml
@echo " <maven.compiler.source>1.8</maven.compiler.source>" >> pom.xml
@echo " <maven.compiler.target>1.8</maven.compiler.target>" >> pom.xml
@echo " <java.version>1.8</java.version>" >> pom.xml
@echo " </properties>" >> pom.xml
@echo " <modules>" >> pom.xml
@for f in *; do \
if [ -f $${f}/pom.xml ]; then \
echo " <module>$$f</module>" >> pom.xml ;\
fi \
done
@echo " </modules>" >> pom.xml
@echo "</project>" >> pom.xml
# Rule "maven"
.PHONY: maven
maven:
mvn clean install
# Rule "maven:monitor"
.PHONY: maven\:monitor
maven\:monitor:
mvn clean install -Pmonitoring
# Rule "docker"
.PHONY: docker
docker:
@for f in *; do \
if [ -d $${f}/docker ]; then \
echo $$f; \
echo "==================================="; \
cd $$f/docker && make build:local && cd ../..; \
echo " "; \
fi \
done
# Rule "build"
.PHONY: build
build: maven docker
# Rule "build:monitor"
.PHONY: build\:monitor
build\:monitor: maven\:monitor docker
# Rule "gitpull"
.PHONY: gitpull
gitpull:
@for f in *; do \
if [ -d $${f}/.git ]; then \
echo $$f; \
echo "==================================="; \
cd $$f && git pull && cd ..; \
echo " "; \
fi \
done
# Rule "gitstatus"
.PHONY: gitstatus
gitstatus:
@for f in *; do \
if [ -d $${f}/.git ]; then \
echo $$f; \
echo "==================================="; \
cd $$f && git status && cd ..; \
echo " "; \
fi \
done
# Rule "gitbranch"
.PHONY: gitbranch
gitbranch:
@for f in *; do \
if [ -d $${f}/.git ]; then \
echo $$f; \
echo "==================================="; \
cd $$f; \
var=$$(git branch | grep "*"); \
echo "$$var"; \
cd ..; \
echo ""; \
fi \
done
# Rule "gitclean"
.PHONY: gitclean
gitclean:
@for f in *; do \
if [ -d $${f}/.git ]; then \
echo $$f; \
echo "==================================="; \
cd $$f && git clean -fd && cd ..; \
echo " "; \
fi \
done
# Rule "gitmaster"
.PHONY: gitmaster
gitmaster:
@for f in *; do \
if [ -d $${f}/.git ]; then \
echo $$f; \
echo "==================================="; \
cd $$f && git checkout master && cd ..; \
echo " "; \
fi \
done
# Rule "run-db"
.PHONY: run-db
run-db:
cd fluig-demo/docker && docker-compose -f docker-db.yml up
# Rule "run-app"
.PHONY: run-app
run-app:
cd fluig-demo/docker && docker-compose -f docker-app.yml up