-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (55 loc) · 1.97 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
help:
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-30s %s\n" $$help_command $$help_info ; \
done
SU:=$(shell id -un)
#######
####### BUILD, TEST, LOCAL RUN
build-server: ## Builds the jar file
./gradlew clean build -x test
test-server: ## Builds the jar file after tests
./gradlew clean build
start:
./gradlew bootRun
start-with-local-db:
BPS_DATASOURCE=jdbc:postgresql://localhost:5442/budget GRADLE_OPTS="-Xmx2048m" ./gradlew bootRun
debug-with-local-db: build-server
BPS_DATASOURCE=jdbc:postgresql://localhost:5442/budget java -Xmx2048m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar build/libs/budget-planner-server-0.0.1-SNAPSHOT.jar
start-with-remote-db:
ifndef dbUser
@echo "Provde the dbUser variable"
exit 1
endif
ifndef dbPassword
@echo "Provde the dbPassword variable"
exit 1
endif
BPS_DB_PASSWORD=$(dbPassword) BPS_DB_USER=$(dbUser) BPS_DATASOURCE=jdbc:postgresql://localhost:6015/budget GRADLE_OPTS="-Xmx2048m" ./gradlew bootRun
debug-with-remote-db: build-server
ifndef dbUser
@echo "Provde the dbUser variable"
exit 1
endif
ifndef dbPassword
@echo "Provde the dbPassword variable"
exit 1
endif
BPS_DB_PASSWORD=$(dbPassword) BPS_DB_USER=$(dbUser) BPS_DATASOURCE=jdbc:postgresql://localhost:6015/budget java -Xmx2048m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar build/libs/budget-planner-server-0.0.1-SNAPSHOT.jar
tunnel-db:
ifndef host
@echo "Provde the host variable"
exit 1
endif
ifndef dbServer
@echo "Provde the hostName variable"
exit 1
endif
ssh $(host) -L 6015:$(dbServer):5432
tunnel-prod-db:
make tunnel-db host=citybudgets.in dbServer=cwas-cm-sql.postgres.database.azure.com