Skip to content

Commit 4f6c218

Browse files
committed
[CI] Cleans up unified release tasks
1 parent 8e9b142 commit 4f6c218

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

rake_tasks/unified_release_tasks.rake

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# frozen_string_literal: true
2-
31
# Licensed to Elasticsearch B.V. under one or more contributor
42
# license agreements. See the NOTICE file distributed with
53
# this work for additional information regarding copyright
@@ -55,35 +53,4 @@ namespace :unified_release do
5553
sh "cd #{CURRENT_PATH.join(output_dir)} && " \
5654
"zip -r #{@zip_filename}.zip * " \
5755
end
58-
59-
desc 'Publish gems to Rubygems'
60-
task :publish do
61-
setup_credentials
62-
63-
RELEASE_TOGETHER.each do |gem|
64-
puts '-' * 80
65-
puts "Releasing #{gem} v#{Elasticsearch::VERSION}"
66-
sh "cd #{CURRENT_PATH.join(gem)} && bundle exec rake release"
67-
end
68-
end
69-
70-
def setup_credentials
71-
raise ArgumentError, 'You need to set the env value for GITHUB_TOKEN' unless ENV['GITHUB_TOKEN']
72-
raise ArgumentError, 'You need to set the env value for RUBYGEMS_API_KEY' unless ENV['RUBYGEMS_API_KEY']
73-
74-
sh 'git config --global user.email ${GIT_EMAIL} && ' \
75-
'git config --global user.name ${GIT_NAME}'
76-
77-
file_name = File.expand_path('~/.gem/credentials')
78-
text = <<~CREDENTIALS
79-
---
80-
:github: Bearer #{ENV['GITHUB_TOKEN']}
81-
:rubygems_api_key: #{ENV['RUBYGEMS_API_KEY']}
82-
CREDENTIALS
83-
File.open(file_name, 'w') do |file|
84-
file.write(text)
85-
end
86-
87-
FileUtils.chmod 0o600, file_name
88-
end
8956
end

0 commit comments

Comments
 (0)