5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-12 15:01:45 +08:00

Verify correct branch

This commit is contained in:
Jarek Jarcec Cecho 2013-06-16 12:32:04 -07:00
parent 4dabfe1c1e
commit d9e8710b91

View File

@ -52,6 +52,10 @@ def sqoop_guess_branch(versions):
return branch
# Verify supported branch
def sqoop_verify_branch(branch):
return branch in {"sqoop2", "SQOOP-1082"}
def execute(cmd, log=True):
if log:
print "INFO: Executing %s" % (cmd)
@ -355,6 +359,10 @@ def post_jira_comment_and_exit():
else:
raise Exception("Not reachable")
# Verify that we are on supported branch
if not sqoop_verify_branch(branch):
print "ERROR: Unsupported branch %s" % (branch)
mvn_clean(result, output_dir)
git_checkout(result, branch)
git_apply(result, patch_cmd, patch_file, strip, output_dir)