Skip to content

Instantly share code, notes, and snippets.

@Maarc
Created March 31, 2017 11:03
Show Gist options
  • Save Maarc/4f1d9767160d547c6525d6a2c270d1af to your computer and use it in GitHub Desktop.
Save Maarc/4f1d9767160d547c6525d6a2c270d1af to your computer and use it in GitHub Desktop.
#!/bin/bash
DIR_CURRENT=$(pwd)
DIR_GIT_CODE=apps-code
DIR_APPS=apps-built
APP_LIST=( https://github.com/MPDL/INGe https://github.com/sidlors/aeweb )
mvnt()
{
echo ">>> Build '$1'"
mvn -f ${DIR_CURRENT}/${DIR_GIT_CODE}/$1 -T 4 -U clean install -Dmaven.test.skip=true -DskipTests || { echo "Issue while executing 'mvnt' in $1"; } #kill -INT $$; }
}
git_clone()
{
echo ">>> Checkout '${1}'"
cd ${DIR_CURRENT}/${DIR_GIT_CODE}
git clone --depth 1 -b master ${1}
}
mkdir -p ${DIR_GIT_CODE} ${DIR_APPS}
rm -f ${DIR_CURRENT}/${DIR_APPS}/*
for app in "${APP_LIST[@]}"; do
git_clone ${app}
done
cd ${DIR_CURRENT}/${DIR_GIT_CODE}
for d in $(find . -maxdepth 1 -mindepth 1 -type d); do
mvnt ${d}
done
echo ">>> Collect applications"
cp ${DIR_CURRENT}/${DIR_GIT_CODE}/INGe/pubman_ear/target/pubman_ear-8.0.0-SNAPSHOT.ear ${DIR_CURRENT}/${DIR_APPS}/.;
cp ${DIR_CURRENT}/${DIR_GIT_CODE}/aeweb/AdministracionEfectivo-ear/target/AdministracionEfectivo.ear ${DIR_CURRENT}/${DIR_APPS}/.;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment