Commit d11f37fc authored by Igor Stegarescu's avatar Igor Stegarescu

Packaging: deploy on seconde server ovh(seconde project)

Change-Id: I7a3ffd70b3efaad861ccd5170c7d1d6214fde6cb
parent 69dd5a09
......@@ -41,7 +41,6 @@ function package_deb()
echo "#########################"
DISTRIBUTION_REPOSITOIRY_FOLDER=$(realpath repositories)/${DISTRIBUTION}
rm -rf ${DISTRIBUTION_REPOSITOIRY_FOLDER}
mkdir -p ${DISTRIBUTION_REPOSITOIRY_FOLDER}/conf
# Distributions file
......@@ -123,7 +122,6 @@ function package_rpm()
echo "#########################"
DISTRIBUTION_REPOSITOIRY_FOLDER=$(realpath repositories)/${DISTRIBUTION}
rm -rf ${DISTRIBUTION_REPOSITOIRY_FOLDER}
mkdir -p ${DISTRIBUTION_REPOSITOIRY_FOLDER}
# .repo file
......@@ -208,9 +206,6 @@ function deploy()
echo "#####################################"
rsync --archive --recursive --verbose --delete ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER} ${REMOTE_MANUAL_DOWNLOAD_LOCATION}
# remove deployed files
rm -rf manual-download
rm -rf repositories
}
......@@ -231,6 +226,13 @@ function package()
fi
}
function remove-deployed-files()
{
# remove deployed files
rm -rf manual-download
rm -rf repositories
rm -rf ${DISTRIBUTION_REPOSITOIRY_FOLDER}
}
for i in "$@"
do
......@@ -262,5 +264,14 @@ case $i in
esac
done
package
deploy
if [ -z "${KEYID}" ];
then
DISTRIBUTION_REPOSITOIRY_FOLDER=$(realpath repositories)/${DISTRIBUTION}
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER=$(realpath manual-download)/${DISTRIBUTION}
deploy
remove-deployed-files
else
package
deploy
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment