forked from minotopiame/FlexPipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·38 lines (24 loc) · 1 KB
/
build.sh
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/bash -e
patcher_commit=`git rev-parse --short HEAD`
cd BungeeCord
echo ""
echo "============ Recieving maven version..."
maven_version=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -B -N | grep '^[[:digit:]]' | tail -1)
origin_commit=`git rev-parse --short origin/master`
if [ -z "$BUILD_NUMBER" ]; then
BUILD_NUMBER="0"
echo "============ Set BUILD_NUMBER to 0, as it was not set";
fi
echo "============ Building FlexPipe version git:$maven_version:origin-$origin_commit:patcher-$patcher_commit:$BUILD_NUMBER"
echo ""
mvn clean install -Dorigin_commit=$origin_commit -Dpatcher_commit=$patcher_commit -Dbuild.number=$BUILD_NUMBER -B
cd ../
echo ""
echo "============ FlexPipe build finished"
echo "============ Copy final jars"
echo ""
mkdir -p target/modules/ || true
cp BungeeCord/bootstrap/target/FlexPipe.jar ./target/
cp BungeeCord/module/*/target/*.jar ./target/modules/
echo ""
echo "============ FlexPipe and module jars copied to ./target/"