Permalink
Browse files

setup hiera-json for release

* Switch to Puppet Labs branding
* Remove deprecated package task
* Add in versioning based upon git describe
  • Loading branch information...
1 parent 0e070bc commit 92bc88eb96e002100d84261aa35cce027ca966b1 @stahnma stahnma committed Jan 12, 2012
Showing with 26 additions and 8 deletions.
  1. +9 −8 Rakefile
  2. +17 −0 tasks/release.rb
View
@@ -1,24 +1,25 @@
require 'rubygems'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
require 'rspec/core/rake_task'
+require 'tasks/release'
spec = Gem::Specification.new do |s|
s.name = "hiera-json"
- s.version = "0.2.0"
- s.author = "R.I.Pienaar"
- s.email = "rip@devco.net"
- s.homepage = "https://github.com/ripienaar/hiera-json/"
+ s.version = described_version
+ s.author = "Puppet Labs"
+ s.email = "info@puppetlabs.com"
+ s.homepage = "https://github.com/puppetlabs/hiera-json/"
s.summary = "JSON backend for the Hiera hierarcical data store"
s.description = "Store Hiera data in JSON"
s.files = FileList["lib/**/*"].to_a
s.require_path = "lib"
- s.test_files = FileList["{spec}/**/*spec.rb"].to_a
+ s.test_files = FileList["spec/**/*.rb"].to_a
s.has_rdoc = true
- s.add_dependency 'hiera', '~>0.2.0'
+ s.add_dependency 'hiera', '~>0.3.0'
s.add_dependency 'json'
end
-Rake::GemPackageTask.new(spec) do |pkg|
+Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
View
@@ -0,0 +1,17 @@
+
+def described_version
+ # This ugly bit removes the gSHA1 portion of the describe as that causes failing tests
+ %x{git describe}.gsub('-', '.').split('.')[0..3].join('.').to_s.gsub('v', '')
+end
+
+namespace :pkg do
+
+ desc "Build Package"
+ task :release => [ :default ] do
+ Rake::Task[:package].invoke
+ end
+
+end # namespace
+
+task :clean => [ :clobber_package ] do
+end

0 comments on commit 92bc88e

Please sign in to comment.