Skip to content

Instantly share code, notes, and snippets.

@ieb
Created July 26, 2011 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ieb/1106556 to your computer and use it in GitHub Desktop.
Save ieb/1106556 to your computer and use it in GitHub Desktop.
Building UCAM Production Instance
#!/bin/sh -e
# This script pulls and builds the ucam production instance.
# Its intended for developers to use. Production builds are normally managed by a Jenkins instance.
UpdateRepo()
{
local name=$1
local branch=$2
if [[ ! -d $name ]]; then
git clone git://github.com/ieb/$name.git
if [[ $branch = "project" ]]; then
git branch --track project origin/project
fi
elif [[ $branch = "master" ]]; then
pushd $name
git co master
git pull origin master
popd
elif [[ $branch = "project" ]]; then
pushd $name
git co project
git pull origin project
popd
else
pushd $name
git co master
git pull
popd
fi
return 1
}
build()
{
local codedir=$1
local options=$3
pushd $codedir
mvn $options -Dmaven.repo.local=/tmp/buidlrepo clean install
popd
}
set +e
UpdateRepo "solr" "master"
UpdateRepo "open-experiments" "project"
UpdateRepo "sparsemapcontent" "master"
UpdateRepo "ucamux" "master"
UpdateRepo "ucamex" "master"
UpdateRepo "3akai-ux" "central"
set -e
build sparsemapcontent
build sparsemapcontent/drivers/postgres
build solr
build 3akai-ux -Dant.target=release
build ucamux
build open-experiments
build ucamex
build open-experiments/contrib/ucam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment