Adding a script for building LBaaS package

* LBaaS_Library.zip (the reslt of the script) is added to gitignore
   in order to prevent adding it to git.

Change-Id: I13295661c52da8d0387545c2f3c444ec49e85034
This commit is contained in:
Nikolay Mahotkin 2016-04-06 11:57:13 +03:00 committed by Alexey Khivin
parent bd12b4fd1e
commit 155a3971a0
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1 @@
LBaaS_Library.zip

View File

@ -0,0 +1,34 @@
# Stop the script if an error occurs.
set -e
function cleanup {
cd $SCRIPTPATH
rm -rf tmp
}
# In case if script is running not where it is located.
cd $(dirname $0)
SCRIPTPATH=`pwd`
# Cleanup tmp dir on script exit.
trap 'cleanup' EXIT
mkdir tmp
cp -v -r Classes Resources manifest.yaml tmp/
archive_name=lbaas.tar.gz
lbaas_directory_name=lbaas_api-0.1
# Pack python tarball.
pushd tmp/Resources/scripts
tar -czvf $archive_name $lbaas_directory_name/*
base64 $archive_name > $archive_name.bs64
rm -rf $lbaas_directory_name
rm -rf $archive_name
popd
# Make murano package.
pushd tmp
zip -r ../LBaaS_Library.zip .
popd