Sha256: cd3d3107f96b7cb23344837d497f9cdce1381474cc9c3fbc27f7d431229de45f

Contents?: true

Size: 951 Bytes

Versions: 2

Compression:

Stored size: 951 Bytes

Contents

Execute.define_task do
  desc "update", "Update an existing application to the latest rhoconnect release"
  def update
    Bundler.with_clean_env do
      `bundle install`
    end

    path_to_tempate = File.expand_path(File.join(File.dirname(__FILE__), '..','..', 'generators', 'templates', 'application'))
    unless File.exist?('.rcgemfile')
      require 'erb'
      File.open('Gemfile.new', 'w') do |f|
        gem_version = Rhoconnect::VERSION
        template = ERB.new(IO.read(File.join(path_to_tempate, 'Gemfile')))
        f << template.result(binding)
      end
      puts "The new Gemfile for rhoconnect version '#{Rhoconnect::VERSION}' is saved as Gemfile.new"
    end

    FileUtils.copy(File.join(path_to_tempate, 'rcgemfile'), '.rcgemfile')

    Bundler.with_clean_env do
      `bundle install`
    end
    puts "\nSee http://docs.rhomobile.com/rhoconnect/install#upgrading-an-existing-application about update details.\n\n"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rhoconnect-4.0.0.beta.10 commands/generators/update.rb
rhoconnect-4.0.0.beta.12 commands/generators/update.rb