-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompile
executable file
·38 lines (38 loc) · 2.41 KB
/
compile
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
#!/bin/sh
# -------------------------------------------------------------------------------------------
# @author: Araf Karsh Hamid
# -------------------------------------------------------------------------------------------
# Developer Local Compile Process
# ===========================================================================================
# 1. Clean up the target folder
# 2. Generate the Build Number (from git commit count) and Build Date
# 3. Build the Service
# 4. Copy the jar file to the Lib Folder
# 5. Start the Service using ./run script and then test it with ./test script
# After the Successful build and Startup of the Service, It should show the Build No. & Date
# -------------------------------------------------------------------------------------------
#
echo "---------------------------------------------------------------------------------------"
echo "Compiling Test (Order) Microservice"
echo "---------------------------------------------------------------------------------------"
echo "Clean up the target folder: mvn clean"
echo "---------------------------------------------------------------------------------------"
mvn clean
# -------------------------------------------------------------------------------------------
echo "Git Commit Count = "`git rev-list HEAD --count`
echo "---------------------------------------------------------------------------------------"
generateBuildNumber
# -------------------------------------------------------------------------------------------
echo "Build the Test (Order) Microservice : mvn -e package"
echo "---------------------------------------------------------------------------------------"
mvn -e package
# -------------------------------------------------------------------------------------------
# echo cp target/ms-test-service-*.jar lib/
# echo "---------------------------------------------------------------------------------------"
# cp target/ms-test-service-*.jar lib/
echo "Copy the application.properties File to the Docker Directory (src/docker)"
cp src/main/resources/application.properties .
# -------------------------------------------------------------------------------------------
echo "Start the Service using ./run script and then test it with ./test script"
echo "After the Successful build and Startup of the Service, It should show the Build No. & Date"
echo "---------------------------------------------------------------------------------------"