forked from gustaflindqvist/jquery-form-validator-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
22 lines (21 loc) · 775 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require "bundler/gem_tasks"
desc "Update jQuery-Form-Validator from Git"
task :update do
BASE = 'jQuery-Form-Validator'
puts "Update from Git #{BASE} sources"
if Dir[BASE].none?
`git clone https://github.com/victorjonsson/jQuery-Form-Validator.git`
end
log = `cd #{BASE} && git pull && npm install && ./node_modules/grunt-cli/bin/grunt build`
if $?.exitstatus
`mkdir ./app/assets/javascripts 2>&1`
`mkdir ./app/assets/javascripts/lang 2>&1`
`mkdir ./app/assets/stylesheets 2>&1`
`cp #{BASE}/form-validator/*.js ./app/assets/javascripts/`
`cp #{BASE}/form-validator/lang/* ./app/assets/javascripts/lang/`
`cp #{BASE}/form-validator/*.css ./app/assets/stylesheets/`
# `rm -rf #{BASE}`
else
puts "Error: #{log}"
end
end