mirror of
https://github.com/apache/sqoop.git
synced 2025-05-12 23:11:43 +08:00
Verify correct branch
This commit is contained in:
parent
4dabfe1c1e
commit
d9e8710b91
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user