Skip to content

Commit ae4573a

Browse files
committed
change maven targets a bit to only have to enter password for pgp signing once
1 parent 451eb05 commit ae4573a

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

Rakefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -549,21 +549,23 @@ def read_user_pass_from_m2_settings
549549
return [user, pass]
550550
end
551551

552-
task :'publish-maven' => JAVA_RELEASE_TARGETS do |t|
553-
t.prerequisites.each do |p|
554-
if JAVA_RELEASE_TARGETS.include?(p)
555-
puts "\n Enter Passphrase:"
556-
passphrase = STDIN.gets.chomp
552+
task :'publish-maven' do
553+
puts "\n Enter Passphrase:"
554+
passphrase = STDIN.gets.chomp
557555

558-
creds = read_user_pass_from_m2_settings()
556+
creds = read_user_pass_from_m2_settings()
557+
JAVA_RELEASE_TARGETS.each do |p|
558+
if JAVA_RELEASE_TARGETS.include?(p)
559+
Buck::buck_cmd.call('build', [p])
559560
Buck::buck_cmd.call('publish', ['--remote-repo', 'https://oss.sonatype.org/service/local/staging/deploy/maven2', '--include-source', '--include-javadoc', '-u', creds[0], '-p', creds[1], '--signing-passphrase', passphrase, p])
560561
end
561562
end
562563
end
563564

564-
task :'maven-install' => JAVA_RELEASE_TARGETS do |t|
565-
t.prerequisites.each do |p|
565+
task :'maven-install' do
566+
JAVA_RELEASE_TARGETS.each do |p|
566567
if JAVA_RELEASE_TARGETS.include?(p)
568+
Buck::buck_cmd.call('build', [p])
567569
Buck::buck_cmd.call('publish', ['--remote-repo', "file://#{ENV['HOME']}/.m2/repository", '--include-source', '--include-javadoc', p])
568570
end
569571
end

0 commit comments

Comments
 (0)