Skip to content

Commit dec42aa

Browse files
committed
[build] fix linting
1 parent 2e90da5 commit dec42aa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Rakefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,6 @@ end
337337
task 'release-java': %i[java-release-zip publish-maven]
338338

339339
def read_m2_user_pass
340-
ENV['MAVEN_USER'] ||= ENV.fetch('SEL_M2_USER', nil)
341-
ENV['MAVEN_PASSWORD'] ||= ENV.fetch('SEL_M2_PASS', nil)
342-
343-
return if ENV['MAVEN_PASSWORD'] && ENV['MAVEN_USER']
344-
345340
puts 'Maven environment variables not set, inspecting /.m2/settings.xml.'
346341
settings = File.read("#{Dir.home}/.m2/settings.xml")
347342
found_section = false
@@ -880,7 +875,10 @@ namespace :java do
880875
args = arguments.to_a.compact
881876
nightly = args.delete('nightly')
882877

883-
read_m2_user_pass
878+
ENV['MAVEN_USER'] ||= ENV.fetch('SEL_M2_USER', nil)
879+
ENV['MAVEN_PASSWORD'] ||= ENV.fetch('SEL_M2_PASS', nil)
880+
read_m2_user_pass unless ENV['MAVEN_PASSWORD'] && ENV['MAVEN_USER']
881+
884882
repo = nightly ? 'content/repositories/snapshots' : 'service/local/staging/deploy/maven2'
885883
ENV['MAVEN_REPO'] = "https://oss.sonatype.org/#{repo}"
886884
ENV['GPG_SIGN'] = (!nightly).to_s

0 commit comments

Comments
 (0)