Skip to content

Instantly share code, notes, and snippets.

@vertein
Last active August 29, 2015 14:09
Show Gist options
  • Save vertein/ac9b2832f0728cda8fc0 to your computer and use it in GitHub Desktop.
Save vertein/ac9b2832f0728cda8fc0 to your computer and use it in GitHub Desktop.
PROJECTS_HOME=~/git/
UPHOME=$PROJECTS_HOME/uPortal/
function upDeployPortlet(){
pushd $UPHOME/
echo "pushed to $UPHOME"
echo "what am I deploying $@"
ant deployPortletApp -DportletApp="$@"
popd
pwd
}
function upRebuildPortlet()
{
pushd $PROJECTS_HOME/${1}/
pwd
mvn clean
mvn package | tee /tmp/${1}.build.log
echo "/tmp ${1}"
WAR=`cat /tmp/${1}.build.log | grep ".war" | grep "$1" | grep "Building war" | uniq | cut -d" " -f4`
echo "Deploying war $WAR"
upDeployPortlet $WAR
popd
pwd
date
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment