Install function for reclass from custom fork
Change-Id: I858a87266e70d9b7756e154dc01fb8ab6dde2f1f
diff --git a/bootstrap.sh b/bootstrap.sh
index 52393d4..150f36e 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -367,6 +367,16 @@
EOF
}
+install_reclass()
+{
+ VERSION=${1:-$RECLASS_VERSION}
+ VERSION=${VERSION:-master}
+ # tries to replace all local version system version
+ for s in $(python -c "import site; print(' '.join(site.getsitepackages()))"); do
+ pip install --upgrade --force-reinstall -I \
+ -t "$s" git+https://github.com/salt-formulas/reclass.git@${VERSION};
+ done
+}
install_salt_master_pkg()
{
@@ -571,6 +581,11 @@
fi
}
+ if [[ $RECLASS_VERSION =~ ^(dev|devel|master)$ ]]; then
+ log_warn "Install development version of reclass from master branch"
+ install_reclass ${RECLASS_VERSION/dev*/master}
+ fi
+
log_info "Re/starting salt services"
pgrep salt-master | sed /$$/d | xargs --no-run-if-empty -i{} $SUDO kill -9 {}
pkill -9 salt-minion