forked from ingeint/idempiere-target-platform-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin-builder
executable file
·35 lines (29 loc) · 932 Bytes
/
plugin-builder
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
#!/usr/bin/env sh
set -e
OPTIONS=
for arg in "$@"
do
if [ "$arg" = "debug" ]; then
OPTIONS="$OPTIONS -X"
echo "Debug mode"
shift
fi
if [ "$arg" = "commit" ]; then
echo "Using commit qualifier"
[ -z "$GIT_COMMIT" ] && echo "Set GIT_COMMIT variable first" && exit 1
OPTIONS="$OPTIONS -DforceContextQualifier=$GIT_COMMIT"
shift
fi
if [ "$arg" = "build" ]; then
echo "Using build number qualifier"
[ -z "$BUILD_NUMBER" ] && echo "Set BUILD_NUMBER variable first" && exit 1
OPTIONS="$OPTIONS -DforceContextQualifier=$BUILD_NUMBER"
shift
fi
done
javac TargetPlatformPomGenerator.java
java TargetPlatformPomGenerator "$@"
mvn validate -Didempiere.target=com.ingeint.template.p2.targetplatform $OPTIONS
mvn verify -Didempiere.target=com.ingeint.template.p2.targetplatform $OPTIONS
javac TargetPlatformPluginTagger.java
java TargetPlatformPluginTagger "$@"