[Project] fixing broken createBundle.sh script

This commit is contained in:
Robert von Burg 2014-09-22 17:01:48 +02:00
parent 59710a812e
commit ea381fe0f8
1 changed files with 4 additions and 3 deletions

View File

@ -2,10 +2,11 @@
projectName=strolch_bundle projectName=strolch_bundle
projectVersion=1.0.0-SNAPSHOT projectVersion=1.0.0-SNAPSHOT
bundle_name="${projectName}-${projectVersion}"
DIST_STROLCH="/var/www/eitch/www.strolch.li/dist/snapshot" DIST_STROLCH="/var/www/eitch/www.strolch.li/dist/snapshot"
DEPLOY_SERVER="appsrv.gsi.local" DEPLOY_SERVER="appsrv.gsi.local"
ROOT="${PWD}" ROOT="${PWD}"
workDir="${ROOT}/target/strolch_bundle-${projectVersion}" workDir="${ROOT}/target/${bundle_name}"
projectsFile="${ROOT}/projects_all.lst" projectsFile="${ROOT}/projects_all.lst"
# first we create all needed packages # first we create all needed packages
@ -76,7 +77,7 @@ while read project; do
done < ${projectsFile} done < ${projectsFile}
cd ${workDir}/.. cd ${workDir}/..
if ! tar -cvzf ${projectName}-${projectVersion}.tar.gz ${projectName} ; then if ! tar -cvzf ${bundle_name}.tar.gz ${bundle_name} ; then
echo "ERROR: Failed to make bundle." echo "ERROR: Failed to make bundle."
exit 1 exit 1
fi fi
@ -87,7 +88,7 @@ if [ "$(hostname -f)" == "${DEPLOY_SERVER}" ] ; then
exit 1 exit 1
fi fi
if ! mv ${projectName}-${projectVersion}.tar.gz "${DIST_STROLCH}" ; then if ! mv ${bundle_name}.tar.gz "${DIST_STROLCH}" ; then
echo "ERROR: Failed to publish bundle." echo "ERROR: Failed to publish bundle."
exit 1 exit 1
fi fi