Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rake task for publishing gem #519

Merged
merged 1 commit into from Jul 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions Rakefile
Expand Up @@ -30,6 +30,20 @@ task :ci do
Rake::Task['coveralls:push'].invoke
end

namespace :gem do
desc "Release gem version #{GoodData::VERSION} to rubygems"
task :release do |t|
gem = "gooddata-#{GoodData::VERSION}.gem"

puts "Building #{gem} ..."
res = system('gem build ./gooddata.gemspec')
next if !res

puts "Pushing #{gem} ..."
res = system("gem push #{gem}")
end
end

namespace :hook do
hook_path = File.join(File.dirname(__FILE__), '.git', 'hooks', 'pre-commit').to_s

Expand Down
10 changes: 6 additions & 4 deletions gooddata.gemspec
Expand Up @@ -18,10 +18,12 @@ Gem::Specification.new do |s|
s.summary = %q{A convenient Ruby wrapper around the GoodData RESTful API}
s.description = %q{Use the GoodData::Client class to integrate GoodData into your own application or use the CLI to work with GoodData directly from the command line.}
s.email = %q{pavel@gooddata.com}
s.executables = ['gooddata']
s.extra_rdoc_files = %w(LICENSE README.md)

s.files = `git ls-files`.split($/)
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }

s.homepage = %q{http://github.com/gooddata/gooddata-ruby}
s.require_paths = ["lib"]

Expand All @@ -37,9 +39,9 @@ Gem::Specification.new do |s|
s.add_development_dependency 'coveralls', '~> 0.7', '>= 0.7.0'
s.add_development_dependency 'guard', '~> 2'
s.add_development_dependency 'guard-rspec', '~> 4'
s.add_development_dependency 'webmock', '~> 1.21.0'
s.add_development_dependency 'debase' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'
s.add_development_dependency 'ruby-debug-ide' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'
s.add_development_dependency 'webmock', '~> 1.21', '>= 1.21.0'
s.add_development_dependency 'debase', '~> 0.1', '>= 0.1.7' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'
s.add_development_dependency 'ruby-debug-ide', '~> 0.4' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'

s.add_dependency 'activesupport', '~> 4.1', '>= 4.1.0'
s.add_dependency 'bundler', '~> 1.7', '>= 1.7.3'
Expand Down