Sha256: 90191e3fe226d179c0498afd5c5c6145f499c59200489f5ae640681eb461ba69
Contents?: true
Size: 1.7 KB
Versions: 7
Compression:
Stored size: 1.7 KB
Contents
begin require 'jeweler' require 'uuidtools' require 'pathname' Jeweler::Tasks.new do |s| s.name = "xultestrunner" s.executables = "xultest" s.summary = "XUL based test runner for running your JS unit tests." s.email = "contact@gironda.org" s.homepage = "http://github.com/gabrielg/xultestrunner" s.description = "XUL based test runner for running your JS unit tests." s.authors = ["Gabriel Gironda"] end application_ini_path = (Pathname(__FILE__).parent + "xulapp/application.ini").expand_path desc "Writes out a random UUID for the Build ID when we release to the XUL application's application.ini" task :write_xul_build_id do build_id = UUIDTools::UUID.random_create.to_s ini_contents = application_ini_path.read application_ini_path.open('w') do |f| f << ini_contents.sub(/^BuildID=.*$/, "BuildID=#{build_id}") end end desc "Writes out the gem version to the XUL application's application.ini" task :write_xul_version do version = (Pathname(__FILE__).parent + "VERSION").read.chomp ini_contents = application_ini_path.read application_ini_path.open('w') do |f| f << ini_contents.sub(/^Version=.*$/, "Version=#{version}") end end desc "Commits the application ini before a release" task :commit_application_ini do system("git", "add", application_ini_path.to_s) system("git", "commit", "-m", "Bumping application.ini", application_ini_path.to_s) end task :release => [:write_xul_build_id, :write_xul_version, :commit_application_ini] rescue LoadError puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com" end
Version data entries
7 entries across 7 versions & 1 rubygems