Skip to content

Commit 9a7a466

Browse files
Backport(v1.19): rake: check GEM_HOST_API_KEY in advance (#5258) (#5260)
**Which issue(s) this PR fixes**: Backport #5258 Fixes # **What this PR does / why we need it**: Without it, if you terminate process, you must manually gem push variant gems such as -x64-mingw-ucrt.gem, -x64-mingw32.gem and -x86-mingw32.gem. e.g. > rake release fluentd 1.19.0 built to pkg/fluentd-1.19.0.gem. Tag v1.19.0 has already been created. Missing required environment variable: GEM_HOST_API_KEY See https://guides.rubygems.org/api-key-scopes/ **Docs Changes**: N/A **Release Note**: N/A Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kentaro Hayashi <hayashi@clear-code.com>
1 parent 7684166 commit 9a7a466

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Rakefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,11 @@ task :coverity do
7878
FileUtils.rm_rf(['./cov-int', 'cov-fluentd.tar.gz'])
7979
end
8080

81+
task :check_env do
82+
unless ENV['GEM_HOST_API_KEY']
83+
abort "Missing required environment variable: GEM_HOST_API_KEY\nSee https://guides.rubygems.org/api-key-scopes/"
84+
end
85+
end
86+
Rake::Task["release:rubygem_push"].enhance(["check_env"])
87+
8188
task default: [:test, :build]

0 commit comments

Comments
 (0)