[Project] fixing bundle creation
This commit is contained in:
parent
252540811a
commit
6e358c7753
|
@ -4,33 +4,37 @@ projectName=strolch_bundle
|
||||||
projectVersion=1.0.0-SNAPSHOT
|
projectVersion=1.0.0-SNAPSHOT
|
||||||
DIST_STROLCH="/var/www/eitch/www.strolch.li/dist/snapshot"
|
DIST_STROLCH="/var/www/eitch/www.strolch.li/dist/snapshot"
|
||||||
workDir="${PWD}/target/strolch_bundle"
|
workDir="${PWD}/target/strolch_bundle"
|
||||||
projectsFile="${PWD}/projects.lst"
|
projectsFile="${PWD}/projects_all.lst"
|
||||||
|
|
||||||
echo "INFO Bootstrapping..."
|
#echo "INFO Bootstrapping..."
|
||||||
if ! ./bootstrap_https.sh ; then
|
#if ! ./bootstrap_https.sh ; then
|
||||||
echo "ERROR: Failed to boostrap!"
|
# echo "ERROR: Failed to boostrap!"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
echo "INFO Pulling..."
|
#echo "INFO Pulling..."
|
||||||
if ! ./pull.sh ; then
|
#if ! ./pull.sh ; then
|
||||||
echo "ERROR: Failed to pull from upstream!"
|
# echo "ERROR: Failed to pull from upstream!"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
# first we create all needed packages
|
## first we create all needed packages
|
||||||
if ! mvn -DskipTests clean package ; then
|
#if ! mvn -DskipTests clean package ; then
|
||||||
echo "ERROR: Failed to build packages!"
|
# echo "ERROR: Failed to build packages!"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# Make sure the work directory exists
|
# Make sure the work directory exists
|
||||||
if ! [ -d "${workDir}" ] ; then
|
if [ -d "${workDir}" ] ; then
|
||||||
if ! mkdir -p "${workDir}" ; then
|
if ! rm -rf "${workDir}" ; then
|
||||||
echo "ERROR: Failed to create work dir ${workDir}."
|
echo "ERROR: Failed to clean work dir ${workDir}."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if ! mkdir -p "${workDir}" ; then
|
||||||
|
echo "ERROR: Failed to create work dir ${workDir}."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "INFO: Bundling projects..."
|
echo "INFO: Bundling projects..."
|
||||||
|
|
||||||
|
@ -49,6 +53,10 @@ while read project; do
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${name}" == "li.strolch.dev" ] ; then
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
if ! cd "../${name}" ; then
|
if ! cd "../${name}" ; then
|
||||||
echo "ERROR: Could not switch to directory ${name}"
|
echo "ERROR: Could not switch to directory ${name}"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -60,21 +68,18 @@ while read project; do
|
||||||
echo "ERROR: Failed to copy package for project ${name}."
|
echo "ERROR: Failed to copy package for project ${name}."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! cp target/*.jar "${DIST_STROLCH}" ; then
|
fi
|
||||||
echo "ERROR: Failed to publish package for project ${name}."
|
if ls target/*.war 2>/dev/null ; then
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
elif ls target/*.war 2>/dev/null ; then
|
|
||||||
if ! cp target/*.war "${workDir}" ; then
|
if ! cp target/*.war "${workDir}" ; then
|
||||||
echo "ERROR: Failed to copy wars for project ${name}."
|
echo "ERROR: Failed to copy wars for project ${name}."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! cp target/*.war "${DIST_STROLCH}" ; then
|
fi
|
||||||
echo "ERROR: Failed to publish wars for project ${name}."
|
if ls target/*.tar.gz 2>/dev/null ; then
|
||||||
|
if ! cp target/*.tar.gz "${workDir}" ; then
|
||||||
|
echo "ERROR: Failed to copy tarballs for project ${name}."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "INFO: Project ${name} has no target, skipping."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done < ${projectsFile}
|
done < ${projectsFile}
|
||||||
|
@ -85,10 +90,15 @@ if ! tar -cvzf ${projectName}-${projectVersion}.tar.gz ${projectName} ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! mv ${projectName}-${projectVersion}.tar.gz "${DIST_STROLCH}" ; then
|
#if ! cp "${workDir}" "${DIST_STROLCH}" ; then
|
||||||
echo "ERROR: Failed to publish bundle."
|
# echo "ERROR: Failed to publish package for project ${name}."
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
|
#if ! mv ${projectName}-${projectVersion}.tar.gz "${DIST_STROLCH}" ; then
|
||||||
|
# echo "ERROR: Failed to publish bundle."
|
||||||
|
# exit 1
|
||||||
|
#fi
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
ch.eitchnet.parent:1.0.0
|
||||||
|
ch.eitchnet.privilege:master
|
||||||
|
ch.eitchnet.utils:master
|
||||||
|
ch.eitchnet.xmlpers:master
|
||||||
|
li.strolch.dev:master
|
||||||
|
li.strolch.parent:master
|
||||||
|
li.strolch.bom:master
|
||||||
|
li.strolch.model:master
|
||||||
|
li.strolch.testbase:master
|
||||||
|
li.strolch.agent:master
|
||||||
|
li.strolch.service:master
|
||||||
|
li.strolch.rest:master
|
||||||
|
li.strolch.persistence.xml:master
|
||||||
|
li.strolch.persistence.postgresql:master
|
||||||
|
li.strolch.tutorialapp:master
|
||||||
|
li.strolch.tutorialwebapp:master
|
||||||
|
li.strolch.website:master
|
Loading…
Reference in New Issue