Sha256: f9575acc9f247b1569ea312d002af9baa9c33d8c91a48cd21f91e5d9c87bde60
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
#!/usr/bin/env ruby require 'fileutils' REFINERY_ROOT = File.expand_path(File.dirname(__FILE__) << "/..") RAILS_ROOT = ARGV.first unless defined? RAILS_ROOT unless RAILS_ROOT.nil? or RAILS_ROOT.length == 0 # ensure asset directories exist. dirs = [%w(public stylesheets), %w(public javascripts), %w(db migrate), %w(lib tasks)] FileUtils::makedirs dirs.map {|dir| File.join(RAILS_ROOT, dir) } # copy in the new assets. assets = [%w(public stylesheets refinery), %w(public javascripts refinery)] assets.each do |asset| FileUtils::rm_rf File.join(RAILS_ROOT, asset), :secure => true # ensure the destination is clear. FileUtils::cp_r File.join(REFINERY_ROOT, asset), File.join(RAILS_ROOT, asset) # copy the new assets into the project. end # copy in any new migrations. FileUtils::cp Dir[File.join(REFINERY_ROOT, %w(db migrate *.rb))], File.join(RAILS_ROOT, %w(db migrate)) # copy any rake tasks from plugins to the main lib directory so they can be run. FileUtils::cp Dir[File.join(REFINERY_ROOT, %w(** tasks *.rake))], File.join(RAILS_ROOT, %w(lib tasks)) puts "---------" puts "Copied new Refinery core assets." puts "Please run rake db:migrate to ensure your database is at the correct version." else puts "Please specify the path of the refinery project that you want to update, i.e. refinery-update-core /path/to/project" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
refinerycms-0.9.5.3 | bin/refinery-update-core |
refinerycms-0.9.5.2 | bin/refinery-update-core |
refinerycms-0.9.5.1 | bin/refinery-update-core |