From 1190400d54680b916d39dde3bad2ebb23fd59155 Mon Sep 17 00:00:00 2001 From: Miklos Fazekas Date: Sat, 12 Mar 2016 12:15:47 +0100 Subject: NET_SSH_NOKEY to allow to build without cert --- Rakefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 039f5cc..3420250 100644 --- a/Rakefile +++ b/Rakefile @@ -31,8 +31,14 @@ begin s.license = "MIT" - s.signing_key = File.join('/mnt/gem/', 'gem-private_key.pem') - s.cert_chain = ['gem-public_cert.pem'] + unless ENV['NET_SSH_NOKEY'] + signing_key = File.join('/mnt/gem/', 'net-ssh-private_key.pem') + s.signing_key = signing_key + s.cert_chain = ['gem-public_cert.pem'] + unless (Rake.application.top_level_tasks & ['build','install']).empty? + raise "No key found at #{signing_key} for signing, use rake NET_SSH_NOKEY=1 to build without key" unless File.exist?(signing_key) + end + end end Jeweler::GemcutterTasks.new rescue LoadError -- cgit v1.2.1