lib/vx/builder/script_builder/prepare.rb in vx-builder-0.5.6 vs lib/vx/builder/script_builder/prepare.rb in vx-builder-0.5.7
- old
+ new
@@ -66,11 +66,18 @@
def build_scm(env, sha, path)
Common::Git.new(env.task.src,
sha,
path,
- branch: env.task.branch,
+ branch: branch_name(env),
pull_request_id: env.task.pull_request_id)
+ end
+
+ def branch_name(env)
+ b = env.task && env.task.branch
+ if b && b != 'HEAD'
+ b
+ end
end
end
end
end