blob: 6857d71d76efa738a5c3d8627c365f3514c0af35 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/usr/bin/env bash
#*******************************************************************************
# Copyright (c) 2016 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# David Williams - initial API and implementation
#*******************************************************************************
# Small, temp utility to patch and build Tycho
if [[ -z "${LOCAL_REPO}" ]]
then
echo "LOCAL_REPO not defined as required"
exit 1
fi
# Similar for SCRIPT_PATH, relevant here only if local, isolated
# build, else, it is defined elsewhere.
export SCRIPT_PATH=${SCRIPT_PATH:-${PWD}}
TYCHO_MVN_ARGS="-Dmaven.repo.local=$LOCAL_REPO -Dtycho.localArtifacts=ignore"
echo -e "\n\tTYCHO_MVN_ARGS: ${TYCHO_MVN_ARGS}\n"
if [[ -d org.eclipse.tycho ]]
then
echo "Removing existing directory: org.eclipse.tycho"
rm -fr org.eclipse.tycho
fi
git clone git://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git --quiet
echo "Tycho Patch"
pushd org.eclipse.tycho
git am --ignore-space-change <${SCRIPT_PATH}/patches/0927-Pascal-s-commit-not-mine-for-bug-461872-.-created-th.patch
rc=$?
if [ $rc != 0 ]
then
echo "Tycho Patch did not apply? git am return code: $rc"
popd
exit $rc
fi
mvn -X -e clean install ${TYCHO_MVN_ARGS}
rc=$?
popd
if [ $rc == 0 ]
then
if [[ -d org.eclipse.tycho.extras ]]
then
echo "Removing existing directory: org.eclipse.tycho.extras"
rm -fr org.eclipse.tycho.extras
fi
git clone git://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.extras.git --quiet
pushd org.eclipse.tycho.extras
mvn -X -e clean install ${TYCHO_MVN_ARGS}
rc=$?
if [ $rc != 0 ]
then
echo -e "\n\t[ERROR] Tycho Extras build failed. mvn returned $rc\n"
exit $rc
fi
else
echo -e "\n\t[ERROR] Tycho Build failed. mvn returned $rc\n"
exit $rc
fi
popd
|