Sha256: c28e14c18261f026265db60f25c4059348940d1a78792b302f2cdd1c23f269e4
Contents?: true
Size: 1.47 KB
Versions: 6
Compression:
Stored size: 1.47 KB
Contents
require "bundler/gem_tasks" desc "Update the source from the webshim github [Specify REF and VERSION]." task :update do if ! ENV['REF'] raise "No REF value given. Set branch/tag/id, e.g., REF=1.2.2" end if ! ENV['VERSION'] raise "No VERSION value given. Set version, e.g., VERSION=1.2.2" end ref = ENV['REF'] version = ENV['VERSION'] cmd = <<EOT mkdir tmp cd tmp rm -rf webshim git clone https://github.com/aFarkas/webshim.git cd webshim git checkout #{ref} cd ../.. rm -rf vendor/assets/javascripts/webshims mv tmp/webshim/js-webshim/dev vendor/assets/javascripts/webshims rm -rf lib/assets/javascripts/webshims mv tmp/webshim/js-webshim/minified lib/assets/javascripts/webshims EOT system cmd version_rb = <<EOT module Webshims module Rails VERSION = "***" WEBSHIMS_VERSION = "***" end end EOT version_rb.gsub!('***', version) File.open('lib/webshims-rails/version.rb','w') do |f| f.write version_rb end puts "Ok, check your work. If you are the gem owner, run rake push VERSION=#{version} to generate and push the gem." input = STDIN.gets.strip end desc "Commit changes, build and push the gem." task :push do if ! ENV['VERSION'] raise "No VERSION value given. Set version, e.g., VERSION=1.2.2" end version = ENV['VERSION'] cmd = <<EOT git add -A . git commit -m "Update webshims to #{version}" gem build webshims-rails.gemspec gem push webshims-rails-#{version}.gem EOT system cmd end
Version data entries
6 entries across 6 versions & 1 rubygems