5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-20 19:00:48 +08:00

SQOOP-1857: Sqoop2: Add rat check to pre-commit hook

(Jarek Jarcec Cecho via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2014-12-11 22:45:07 -06:00
parent c3900910f8
commit 546f861527

View File

@ -214,6 +214,13 @@ def mvn_clean(result, output_dir):
else:
result.fatal("failed to clean project (exit code %d)" % (rc))
def mvn_rat(result, output_dir):
rc = execute("mvn apache-rat:check 1>%s/rat.txt 2>&1" % output_dir)
if rc == 0:
result.success("License check passed")
else:
result.fatal("Failed to run license check (exit code %d)" % (rc))
def mvn_install(result, output_dir):
rc = execute("mvn install -DskipTests 1>%s/install.txt 2>&1" % output_dir)
if rc == 0:
@ -417,6 +424,7 @@ def post_jira_comment_and_exit():
git_checkout(result, branch)
git_apply(result, patch_cmd, patch_file, strip, output_dir)
static_test(result, patch_file, output_dir)
mvn_rat(result, output_dir)
mvn_install(result, output_dir)
if run_tests:
mvn_test(result, output_dir)