Sha256: 82cf485e80d0095c9bb5b3dc88e53f920facf08a7a44d1e5e2e92599eaaecf45
Contents?: true
Size: 980 Bytes
Versions: 18
Compression:
Stored size: 980 Bytes
Contents
require 'rubygems/package_task' require 'rake/clean' require 'yaml' require 'fileutils' NAME='<%= bundle_name %>' INFOS = YAML::load(File.read("lib/webgen/bundle/#{NAME}/info.yaml")) CLOBBER << "VERSION" file 'VERSION' do puts "Generating VERSION file for #{INFOS['version']}" File.open('VERSION', 'w+') {|file| file.write(INFOS['version'] + "\n")} end spec = Gem::Specification.new do |s| s.name = "webgen-#{NAME}-bundle" s.version = INFOS['version'] s.summary = INFOS['summary'] s.description = INFOS['description'] s.files = FileList.new(['lib/**/*', 'README.md', 'VERSION']) s.require_path = 'lib' s.has_rdoc = false author_info = INFOS['author'].scan(/(?:^|,)\s*(.*?)\s*<(.*?)>/) s.authors = author_info.map(&:first) s.email = author_info.map(&:last) s.homepage = INFOS['homepage'] end Gem::PackageTask.new(spec).define task :gem => ['VERSION'] task :release => [:gem] do sh "gem push pkg/webgen-#{NAME}-bundle-#{INFOS['version']}.gem" end
Version data entries
18 entries across 18 versions & 1 rubygems