Sha256: 10bf9f5ff75adf0aab97cd32fb90334938b5981b632f9c5002e76871d141f7c1
Contents?: true
Size: 1.72 KB
Versions: 2
Compression:
Stored size: 1.72 KB
Contents
#!/usr/bin/env rake require 'json' require File.expand_path('../lib/bootstrap-typeahead-rails/version', __FILE__) desc "Update assets" task :update do if Dir.exist?('bootstrap-typeahead-src') system("cd bootstrap-typeahead-src && git pull && cd ..") else system("git clone git@github.com:twitter/typeahead.js.git bootstrap-typeahead-src") end if Dir.exist?('bootstrap-typeahead-css-src') system("cd bootstrap-typeahead-css-src && git pull && cd ..") else system("git clone git@github.com:jharding/typeahead.js-bootstrap.css.git bootstrap-typeahead-css-src") end system("cp bootstrap-typeahead-src/dist/typeahead.js vendor/assets/javascripts/bootstrap-typeahead-rails/bootstrap-typeahead.js") system("cp bootstrap-typeahead-css-src/typeahead.js-bootstrap.css vendor/assets/stylesheets/bootstrap-typeahead-rails/bootstrap-typeahead.css") # system("cp bootstrap-typeahead-css-src/typeahead.js-bootstrap.less vendor/assets/stylesheets/bootstrap-typeahead-rails/bootstrap-typeahead.less") system("git status") puts "\n" puts "bootstrap-typeahead version: #{JSON.parse(File.read('./bootstrap-typeahead-src/component.json'))['version']}" puts "bootstrap-typeahead-rails version: #{BootstrapTypeaheadRails::Rails::VERSION}" end desc "Build" task "build" do system("gem build bootstrap-typeahead-rails.gemspec") end desc "Build and publish the gem" task :publish => :build do tags = `git tag`.split current_version = BootstrapTypeaheadRails::Rails::VERSION system("git tag -a #{current_version} -m 'Release #{current_version}'") unless tags.include?(current_version) system("gem push bootstrap-typeahead-rails-#{current_version}.gem") system("git push --follow-tags") end task :release => :publish do end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bootstrap-typeahead-rails-0.9.3.3 | Rakefile |
bootstrap-typeahead-rails-0.9.3.2 | Rakefile |