Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 86a4e2862dab042d69b62b17a03039dabfbedeb5 (plain) (blame)
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
#!/bin/bash

BASE=$( cd $( dirname "$0" ) > /dev/null ; pwd )

if [[ ! -e "$BASE/setup.sh" ]]; then
   echo "Copy cbi_setup.tpl to $BASE/setup.sh and modify it for your local environment"
   exit 1
fi


source "$BASE/setup.sh"

if [[ ! -e "${m2settings}" ]]; then
    echo "Copy $HOME/.m2/settings.xml or cbi_settings.tpl to ${m2settings}"
    exit 1
fi

mvnWrapper() {
    mvn -Dmaven.repo.local="${m2repo}" --settings "${m2settings}" "$@" || exit 1
}

cmd="$1"

case "$cmd" in
    build ) #CMD Build all the sources
        mvnWrapper -f eclipse-parent/pom.xml clean install
        mvnWrapper -f maven-cbi-plugin/pom.xml clean install
        mvnWrapper clean install -Dmaven.test.skip=true
        echo "Build successful"
        echo "You can find the installation files in $BASE/../eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products/"
        ls -l "$BASE/../eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products"
        ;;

    test ) #CMD Run the tests. You must build at least once before you can run this
        # TODO
        ;;

    * )
        echo "Missing command. Available are:"
        grep CMD "$0" | grep -v grep | sed -e "s:^[ \t]+::g" -e 's:[)] #CMD:-:'
        ;;
esac

exit 0

Back to the top