forked from Nerian/bootstrap-datepicker-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
28 lines (25 loc) · 1.13 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env rake
desc "Update assets"
task :update do
if Dir.exist?('bootstrap-datepicker-src')
system("cd bootstrap-datepicker-src && git pull && cd ..")
else
system("git clone git://github.com/eternicode/bootstrap-datepicker.git bootstrap-datepicker-src")
end
system("cp bootstrap-datepicker-src/css/datepicker.css vendor/assets/stylesheets/bootstrap-datepicker.css")
system("cp bootstrap-datepicker-src/js/bootstrap-datepicker.js vendor/assets/javascripts/bootstrap-datepicker/core.js")
system("cp -R bootstrap-datepicker-src/js/locales/ vendor/assets/javascripts/bootstrap-datepicker/locales/")
system("git status")
end
desc "Build"
task "build" do
system("gem build bootstrap-datepicker-rails.gemspec")
end
desc "Build and publish the gem"
task :publish => :build do
require File.expand_path('../lib/bootstrap-datepicker-rails/version', __FILE__)
tags = `git tag`
system("git tag #{BootstrapDatepickerRails::Rails::VERSION}") unless tags =~ /#{BootstrapDatepickerRails::Rails::VERSION}/
system("gem push bootstrap-datepicker-rails-#{BootstrapDatepickerRails::Rails::VERSION}.gem")
system("git push --tags")
end