-
Notifications
You must be signed in to change notification settings - Fork 320
/
full-build.sh
executable file
·58 lines (51 loc) · 1.52 KB
/
full-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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
MVN_ARGS=(\
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
)
# args parsing inspired by https://gist.github.com/jehiah/855086
while [ "$1" != "" ]; do
PARAM=`echo $1 | awk -F= '{print $1}'`
VALUE=`echo $1 | awk -F= '{print $2}'`
case $PARAM in
-h | --help)
echo "Perform Maven/Tycho build for Xtext"
echo ""
echo "./full-build.sh"
echo -e "\t-h --help"
echo -e "\t--no-tests Skip test execution"
echo -e "\t--local-repository=<PATH> Use local Maven repository"
echo -e "\t--tp=$TARGET_PLATFORM (valid values: r2024-03,r2024-06,...,latest)"
echo ""
exit
;;
--no-tests)
MVN_ARGS+=(-DskipTests=true -Dit-archetype-tests-skip=true)
;;
--local-repository)
MVN_ARGS+=" -Dmaven.repo.local=$VALUE"
;;
--tp)
MVN_ARGS+=" -Dtarget-platform-classifier=xtext-$VALUE"
;;
*)
# append any additionally passed arg
if [ -z "$VALUE" ]; then
MVN_ARGS+=($PARAM)
else
MVN_ARGS+=($PARAM=$VALUE)
fi
;;
esac
shift
done
MVN_ARGS+=(-fae)
MVN_ARGS+=(-PuseJenkinsSnapshots)
MVN_ARGS+=("-Dmaven.home=$(./mvnw --version | grep "Maven home:" | cut -c 13-)")
echo ./mvnw -B -f org.eclipse.xtext.full.releng ${MVN_ARGS[@]} $@
#echo "Using target platform '$TARGET_PLATFORM'"
./mvnw -B \
-f org.eclipse.xtext.full.releng \
clean deploy \
-DaltDeploymentRepository=local::default::file:./build/maven-repository \
${MVN_ARGS[@]} \
$@