diff options
author | Lars Vogel | 2013-10-24 09:20:22 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-10-25 13:42:20 +0000 |
commit | 3484cb7b17c9212247098f738357c254b02b2231 (patch) | |
tree | 74d6cf9b184961002f645d836da368c8bccc7d01 /scripts | |
parent | 8401b49307ce53cbbe58ea9529e263b9d1eb757b (diff) | |
download | eclipse.platform.releng.aggregator-3484cb7b17c9212247098f738357c254b02b2231.tar.gz eclipse.platform.releng.aggregator-3484cb7b17c9212247098f738357c254b02b2231.tar.xz eclipse.platform.releng.aggregator-3484cb7b17c9212247098f738357c254b02b2231.zip |
Bug 42021 - Provide README and build script to make CBI build more
accessible
Change-Id: Icff4aaf2040f2cc721c8bc59c2054727482893f0
Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 118 | ||||
-rwxr-xr-x | scripts/cbi_build.sh | 52 |
2 files changed, 17 insertions, 153 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 5cd9ea44d..829208332 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,103 +1,19 @@ #!/bin/bash -BASEDIR=$(pwd) -LOG=$BASEDIR/log_$( date +%Y%m%d%H%M%S ).txt -exec >$LOG 2>&1 - -BRANCH=master -GIT_PREFIX=ssh://git.eclipse.org -javaHome=/opt/local/jdk1.7.0_07 -mvnPath=/opt/pwebster/git/cbi/apache-maven-3.1.0/bin -updateAggregator=false - -while [ $# -gt 0 ] -do - case "$1" in - "-v") - mavenVerbose=-X;; - "-bree-libs") - mavenBREE=-Pbree-libs;; - "-sign") - mavenSign=-Peclipse-sign;; - "-update") - updateAggregator=true;; - "-anonymous") - GIT_PREFIX=git://git.eclipse.org;; - "-gitPrefix") - GIT_PREFIX="$2" ; shift;; - "-branch") - BRANCH="$2" ; shift;; - "-javaHome") - javaHome="$2" ; shift;; - "-mavenPath") - mvnPath="$2" ; shift;; - esac - shift -done - - -export MAVEN_OPTS=-Xmx2560m -LOCAL_REPO=$BASEDIR/localRepo - - -if [ -z "$JAVA_HOME" ]; then - export JAVA_HOME=$javaHome -fi - -mvnRegex=$( echo $mvnPath | sed 's!/!.!g' ) -if ! (echo $PATH | grep "$mvnRegex" >/dev/null ); then - export PATH=${mvnPath}:$PATH -fi - - -cloneAggregator() { - if [ ! -d eclipse.platform.releng.aggregator ]; then - git clone \ - -b $BRANCH \ - ${GIT_PREFIX}/gitroot/platform/eclipse.platform.releng.aggregator.git - pushd eclipse.platform.releng.aggregator - git submodule init - # this will take a while ... a long while - git submodule update - popd - else - pushd eclipse.platform.releng.aggregator - git fetch - git checkout $BRANCH - git pull - git submodule update - popd - fi -} - -installEclipseParent () { - pushd eclipse.platform.releng.aggregator - mvn -f eclipse-platform-parent/pom.xml \ - clean install \ - -Dmaven.repo.local=$LOCAL_REPO - popd -} - -buildAggregator () { - pushd eclipse.platform.releng.aggregator - mvn $mavenVerbose \ - clean install \ - $mavenSign \ - $mavenBREE \ - -Dmaven.test.skip=true \ - -Dmaven.repo.local=$LOCAL_REPO - popd -} - -# steps to get going - -if $updateAggregator; then - cloneAggregator -fi - -# pick up any changes -installEclipseParent - -# build from the aggregator root -buildAggregator - +clean up "dirt" from previous build +# see Bug 420078 +git submodule foreach git clean -f -d -x +git submodule foreach git reset --hard HEAD +git clean -f -d -x +git reset --hard HEAD + +# update master and submodules +git checkout master +git pull --recurse-submodules +git submodule update + +# run the build +mvn clean verify + +# find the results in +# eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products/* diff --git a/scripts/cbi_build.sh b/scripts/cbi_build.sh deleted file mode 100755 index 7020ec476..000000000 --- a/scripts/cbi_build.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -### -### THIS SCRIPT IS DEPRECATED, USE build.sh INSTEAD. -### - -echo "WARNING: This script is deprecated and will be removed in the future, please use build.sh instead." - - - -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-platform-parent/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 - |