[ -z "$name" ] && continue
#name="$(basename $repo)"
+ branch=$(git_branch) || continue
+ [ -z "$branch" ] && continue
+
#
# Get user
#
#
# Pull
#
- echo ">Pull $name branch=$(git_branch) user=$user path=$repo"
+ echo ">Pull $name branch=$branch user=$user path=$repo"
cmd="${cmd}GIT_SSH=$GIT_SSH cd \"$repo\" && git pull"
[ "$CLEANUP" = "1" ] && cmd="$cmd && git gc"
fi
echo
- nb_api_post_host_info key=repo.$name.exit_code val=$ex
- nb_api_post_host_info key=repo.$name.last_commit val=$(cd "$repo" && git log | head -1 | awk '/^commit/ { print $2; exit; }')
+ key="repo.$name.$branch"
+ nb_api_post_host_info "key=${key}.path" "val=$repo"
+ nb_api_post_host_info "key=${key}.exit_code" "val=$ex"
+ nb_api_post_host_info "key=${key}.last_commit" val=$(cd "$repo" && git log | head -1 | awk '/^commit/ { print $2; exit; }')
done