fuel-plugin-nsxv/pre_build_hook

25 lines
841 B
Bash
Executable File

#!/bin/bash
# Add here any the actions which are required before plugin build
# like packages building, packages downloading from mirrors and so on.
# The script should return 0 if there were no errors.
set -eux
ROOT="$(dirname `readlink -f $0`)"
PLUGIN_MOD_DIR="$ROOT/deployment_scripts/puppet/modules/upstream"
version=$(sed -rn 's/^version:\s*([0-9.])/\1/p' $ROOT/metadata.yaml)
name=$(sed -rn 's/^name:\s*(.*)/\1/p' $ROOT/metadata.yaml)
sed -i "s/'NAME'/'$name'/" $ROOT/deployment_scripts/puppet/modules/nsxv/files/reconf_neutron_with_new_compute.sh
## Download upstream puppet modules that are not in fuel-library/
#$ROOT/remove_modules.sh
#$ROOT/update_modules.sh -d $PLUGIN_MOD_DIR
#
## Remove .git directory
#rm -fr $(find $PLUGIN_MOD_DIR -name '.git' )
#
#mv $PLUGIN_MOD_DIR/* $(dirname $PLUGIN_MOD_DIR)
#rmdir $PLUGIN_MOD_DIR