Fixed built plugin - added full cleaning

* Added full cleaning of all upstream modules during the rebuilding
  plugin
* Deleted superfluous script "remove_modules.sh"

Change-Id: Ica8210fbc202516202997300280d0d8b7ef83565
Closes-Bug: #1582217
This commit is contained in:
Artem Savinov 2016-05-16 18:04:14 +03:00
parent 2dd93c66c2
commit 4a40aa6b4e
2 changed files with 2 additions and 16 deletions

View File

@ -7,9 +7,10 @@ set -eux
ROOT="$(dirname $(readlink -f $0))"
PLUGIN_MOD_DIR="$ROOT/deployment_scripts/puppet/modules/upstream"
NAME=$(sed -rn 's/^name:\s*(.*)/\1/p' "$ROOT"/metadata.yaml)
# Download upstream puppet modules that are not in fuel-library/
"$ROOT"/remove_modules.sh
find "$ROOT/deployment_scripts/puppet/modules" -maxdepth 1 -mindepth 1 -type d ! -name $NAME -prune -exec rm -fr {} \;
"$ROOT"/update_modules.sh -d "$PLUGIN_MOD_DIR"
# Remove .git directory

View File

@ -1,15 +0,0 @@
#!/bin/sh -e
# remove all external puppet modules
PLUGIN_MOD_DIR="deployment_scripts/puppet/modules"
dir=$(dirname $0)
cd "${dir}" || exit 1
grep "^mod '" Puppetfile| awk -F "'" '{ print $2 }' | while read module; do
if [ -d "${PLUGIN_MOD_DIR}/${module}" ]; then
echo "Remove: ${PLUGIN_MOD_DIR}/${module}"
rm -rf "${PLUGIN_MOD_DIR:?}/${module}"
fi
done
rm -f 'Puppetfile.lock'