Repository: yetus Updated Branches: refs/heads/master 62e1d22a4 -> 2ce16aa2e
YETUS-510 build tools should add version into to report. Signed-off-by: Mike Drob <[email protected]> Signed-off-by: Allen Wittenauer <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/2ce16aa2 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/2ce16aa2 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/2ce16aa2 Branch: refs/heads/master Commit: 2ce16aa2ead07e45a1a203054ace0a2cf16741cf Parents: 62e1d22 Author: Sean Busbey <[email protected]> Authored: Wed Oct 11 23:51:05 2017 -0500 Committer: Sean Busbey <[email protected]> Committed: Sun Oct 22 01:00:20 2017 -0500 ---------------------------------------------------------------------- precommit/test-patch.d/ant.sh | 5 +++++ precommit/test-patch.d/autoconf.sh | 5 +++++ precommit/test-patch.d/cmake.sh | 4 ++++ precommit/test-patch.d/gradle.sh | 4 ++++ precommit/test-patch.d/make.sh | 7 ++++++- precommit/test-patch.d/maven.sh | 5 +++++ 6 files changed, 29 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/2ce16aa2/precommit/test-patch.d/ant.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/ant.sh b/precommit/test-patch.d/ant.sh index ecf8b3c..63aa7ca 100755 --- a/precommit/test-patch.d/ant.sh +++ b/precommit/test-patch.d/ant.sh @@ -65,10 +65,15 @@ function ant_initialize function ant_precheck { + declare ant_version + if ! verify_command ant "${ANT}"; then add_vote_table -1 ant "ERROR: ant is not available." return 1 fi + # finally let folks know what version they'll be dealing with. + ant_version=$(${ANT} -version 2>/dev/null) + add_footer_table ant "version: ${ant_version}" return 0 } http://git-wip-us.apache.org/repos/asf/yetus/blob/2ce16aa2/precommit/test-patch.d/autoconf.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/autoconf.sh b/precommit/test-patch.d/autoconf.sh index 7f8d5a7..b1e2e2b 100755 --- a/precommit/test-patch.d/autoconf.sh +++ b/precommit/test-patch.d/autoconf.sh @@ -60,11 +60,16 @@ function autoconf_initialize ## @replaceable no function autoconf_precheck { + declare autoconf_version if ! verify_command autoconf autoreconf; then add_vote_table -1 autoconf "autoreconf was not available." return 1 fi + # finally let folks know what version they'll be dealing with. + autoconf_version=$(autoconf --version 2>/dev/null | head -n 1 2>/dev/null) + add_footer_table autoconf "version: ${autoconf_version}" + make_precheck } http://git-wip-us.apache.org/repos/asf/yetus/blob/2ce16aa2/precommit/test-patch.d/cmake.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/cmake.sh b/precommit/test-patch.d/cmake.sh index 9c1da70..38a48c8 100755 --- a/precommit/test-patch.d/cmake.sh +++ b/precommit/test-patch.d/cmake.sh @@ -72,10 +72,14 @@ function cmake_initialize ## @replaceable no function cmake_precheck { + declare cmake_version if ! verify_command cmake "${CMAKE}"; then add_vote_table -1 cmake "cmake was not available." return 1 fi + # finally let folks know what version they'll be dealing with. + cmake_version=$(${CMAKE} --version 2>/dev/null | head -n 1 2>/dev/null) + add_footer_table cmake "version: ${cmake_version}" make_precheck } http://git-wip-us.apache.org/repos/asf/yetus/blob/2ce16aa2/precommit/test-patch.d/gradle.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/gradle.sh b/precommit/test-patch.d/gradle.sh index 9311c49..c8d5088 100755 --- a/precommit/test-patch.d/gradle.sh +++ b/precommit/test-patch.d/gradle.sh @@ -53,10 +53,14 @@ function gradle_parse_args function gradle_precheck { + declare gradle_version if ! verify_command gradle "${GRADLE}"; then add_vote_table -1 gradle "ERROR: gradle is not available." return 1 fi + # finally let folks know what version they'll be dealing with. + gradle_version=$(${GRADLE} --version 2>/dev/null | grep Gradle 2>/dev/null) + add_footer_table gradle "version: ${gradle_version}" return 0 } http://git-wip-us.apache.org/repos/asf/yetus/blob/2ce16aa2/precommit/test-patch.d/make.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/make.sh b/precommit/test-patch.d/make.sh index 19a8196..6fb2b59 100755 --- a/precommit/test-patch.d/make.sh +++ b/precommit/test-patch.d/make.sh @@ -33,12 +33,17 @@ function make_usage ## @audience private ## @stability evolving ## @replaceable no -function cmake_precheck +function make_precheck { + declare make_version if ! verify_command make "${MAKE}"; then add_vote_table -1 make "make was not available." return 1 fi + # finally let folks know what version they'll be dealing with. + if make_version=$(set -o pipefail; ${MAKE} --version 2>/dev/null | head -n 1 2>/dev/null) && [ -n "${make_version}" ]; then + add_footer_table make "version: ${make_version}" + fi return 0 } http://git-wip-us.apache.org/repos/asf/yetus/blob/2ce16aa2/precommit/test-patch.d/maven.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh index a0aa625..e3865be 100755 --- a/precommit/test-patch.d/maven.sh +++ b/precommit/test-patch.d/maven.sh @@ -131,6 +131,7 @@ function maven_precheck { declare logfile="${PATCH_DIR}/mvnrepoclean.log" declare line + declare maven_version if ! verify_command maven "${MAVEN}"; then add_vote_table -1 maven "ERROR: maven was not available." @@ -181,6 +182,10 @@ function maven_precheck rm -rf "${line}" done < "${logfile}" fi + + # finally let folks know what version they'll be dealing with. + maven_version=$(${MAVEN} --offline --version 2>/dev/null | head -n 1 2>/dev/null) + add_footer_table maven "version: ${maven_version}" } function maven_filefilter
