Skip to content

Commit

Permalink
bazel: generate dependencies correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Aug 26, 2019
1 parent fd56557 commit 7a7ba03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ JAVA_RELEASE_TARGETS = %w(
//java/server/src/com/thoughtworks/selenium/webdriven:webdriven-publish
//java/client/src/org/openqa/selenium/support:support-publish
//java/client/src/org/openqa/selenium/safari:safari-publish
//java/client/src/org/openqa/selenium/remote/http:http-publish
//java/client/src/org/openqa/selenium/remote:remote-publish
//java/client/src/org/openqa/selenium/opera:opera-publish
//java/client/src/org/openqa/selenium/lift:lift-publish
Expand Down Expand Up @@ -465,7 +466,7 @@ task :'publish-maven' => JAVA_RELEASE_TARGETS do
puts "\n Enter Passphrase:"
passphrase = STDIN.gets.chomp

creds = read_user_pass_from_m2_settings()
creds = r_pass_from_m2_settings()
JAVA_RELEASE_TARGETS.each do |p|
Bazel::execute('run', ['--stamp', '--define', 'https://oss.sonatype.org/service/local/staging/deploy/maven2', '--define', "maven_user=#{creds[0]}", '--define', "maven_password=#{creds[1]}", '--define', "gpg_password=#{passphrase}"], p)
end
Expand Down
3 changes: 3 additions & 0 deletions java/private/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def _has_maven_deps_impl(target, ctx):
exports = getattr(ctx.rule.attr, "exports", [])
rt_deps = getattr(ctx.rule.attr, "runtime_deps", [])
all_deps = deps + exports + rt_deps
if getattr(ctx.rule.attr, "target", None):
all_deps.append(getattr(ctx.rule.attr, "target"))

coordinates = read_coordinates(tags)
if "maven:compile_only" in tags:
Expand Down Expand Up @@ -68,6 +70,7 @@ has_maven_deps = aspect(
"deps",
"exports",
"runtime_deps",
"target",
],
)

Expand Down

0 comments on commit 7a7ba03

Please sign in to comment.