Add version check, updating/building status messages to testing script.

This commit is contained in:
Sergio Benitez 2016-12-11 22:15:15 -08:00
parent 6bc0fa8871
commit 9e86fa2f81
1 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,8 @@ function build_and_test() {
# Checks that the versions for Cargo projects $@ all match # Checks that the versions for Cargo projects $@ all match
function check_versions_match() { function check_versions_match() {
echo ":: Ensuring all crate versions match..."
local last_version="" local last_version=""
for dir in $@; do for dir in $@; do
local cargo_toml="${dir}/Cargo.toml" local cargo_toml="${dir}/Cargo.toml"
@ -45,15 +47,17 @@ function check_versions_match() {
done done
} }
# Update dependencies first. check_versions_match "${LIB_DIR}" "${CODEGEN_DIR}" "${CONTRIB_DIR}"
# Update dependencies before running tests.
echo ":: Updating dependencies..."
cargo update cargo update
echo ":: Building and testing libraries..."
build_and_test "${LIB_DIR}" build_and_test "${LIB_DIR}"
build_and_test "${CODEGEN_DIR}" build_and_test "${CODEGEN_DIR}"
build_and_test "${CONTRIB_DIR}" build_and_test "${CONTRIB_DIR}"
check_versions_match "${LIB_DIR}" "${CODEGEN_DIR}" "${CONTRIB_DIR}"
for file in ${EXAMPLES_DIR}/*; do for file in ${EXAMPLES_DIR}/*; do
if [ -d "${file}" ]; then if [ -d "${file}" ]; then
bootstrap_script="${file}/bootstrap.sh" bootstrap_script="${file}/bootstrap.sh"