File tree Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Original file line number Diff line number Diff line change 1
- # frozen_string_literal: true
2
-
3
1
# Licensed to Elasticsearch B.V. under one or more contributor
4
2
# license agreements. See the NOTICE file distributed with
5
3
# this work for additional information regarding copyright
@@ -55,35 +53,4 @@ namespace :unified_release do
55
53
sh "cd #{ CURRENT_PATH . join ( output_dir ) } && " \
56
54
"zip -r #{ @zip_filename } .zip * " \
57
55
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
89
56
end
You can’t perform that action at this time.
0 commit comments