Skip to content

Commit

Permalink
[build] fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jun 18, 2024
1 parent 2e90da5 commit dec42aa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ end
task 'release-java': %i[java-release-zip publish-maven]

def read_m2_user_pass
ENV['MAVEN_USER'] ||= ENV.fetch('SEL_M2_USER', nil)
ENV['MAVEN_PASSWORD'] ||= ENV.fetch('SEL_M2_PASS', nil)

return if ENV['MAVEN_PASSWORD'] && ENV['MAVEN_USER']

puts 'Maven environment variables not set, inspecting /.m2/settings.xml.'
settings = File.read("#{Dir.home}/.m2/settings.xml")
found_section = false
Expand Down Expand Up @@ -880,7 +875,10 @@ namespace :java do
args = arguments.to_a.compact
nightly = args.delete('nightly')

read_m2_user_pass
ENV['MAVEN_USER'] ||= ENV.fetch('SEL_M2_USER', nil)
ENV['MAVEN_PASSWORD'] ||= ENV.fetch('SEL_M2_PASS', nil)
read_m2_user_pass unless ENV['MAVEN_PASSWORD'] && ENV['MAVEN_USER']

repo = nightly ? 'content/repositories/snapshots' : 'service/local/staging/deploy/maven2'
ENV['MAVEN_REPO'] = "https://oss.sonatype.org/#{repo}"
ENV['GPG_SIGN'] = (!nightly).to_s
Expand Down

0 comments on commit dec42aa

Please sign in to comment.