chore: Another attempt to fix the releaser (#2220)
This commit is contained in:
parent
4c9181f8dd
commit
b56bfff57d
|
@ -17,7 +17,6 @@ class Releaser
|
||||||
@docuploader_credentials = File.join(ENV["KOKORO_KEYSTORE_DIR"], "73713_docuploader_service_account")
|
@docuploader_credentials = File.join(ENV["KOKORO_KEYSTORE_DIR"], "73713_docuploader_service_account")
|
||||||
end
|
end
|
||||||
@dry_run = dry_run ? true : false
|
@dry_run = dry_run ? true : false
|
||||||
@rubygems_api_token_configured = false
|
|
||||||
@bundle_updated = false
|
@bundle_updated = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -36,7 +35,6 @@ class Releaser
|
||||||
end
|
end
|
||||||
|
|
||||||
def publish_gem
|
def publish_gem
|
||||||
configure_rubygems_api_token
|
|
||||||
Dir.chdir(gem_dir) do
|
Dir.chdir(gem_dir) do
|
||||||
FileUtils.rm_rf("pkg")
|
FileUtils.rm_rf("pkg")
|
||||||
isolate_bundle do
|
isolate_bundle do
|
||||||
|
@ -111,17 +109,14 @@ class Releaser
|
||||||
end
|
end
|
||||||
|
|
||||||
def gems_client
|
def gems_client
|
||||||
@gems_client ||= Gems::Client.new
|
@gems_client ||= begin
|
||||||
end
|
|
||||||
|
|
||||||
def configure_rubygems_api_token
|
|
||||||
return if @rubygems_api_token_configured
|
|
||||||
@rubygems_api_token_configured = true
|
|
||||||
if rubygems_api_token
|
if rubygems_api_token
|
||||||
Gems.configure do |config|
|
Gems.configure do |config|
|
||||||
config.key = rubygems_api_token
|
config.key = rubygems_api_token
|
||||||
end
|
end
|
||||||
puts "Configured rubygems api token"
|
puts "Configured rubygems api token of length #{rubygems_api_token.length}"
|
||||||
|
end
|
||||||
|
Gems::Client.new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue