Sha256: 2883a7e50d6c294b827396353d36a61ac67f9fe39e1d76da28928df4de31c4fe

Contents?: true

Size: 953 Bytes

Versions: 4

Compression:

Stored size: 953 Bytes

Contents

Execute.define_task do
  desc "update", "Updates 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

4 entries across 4 versions & 1 rubygems

Version Path
rhoconnect-3.4.5 commands/generators/update.rb
rhoconnect-3.4.4 commands/generators/update.rb
rhoconnect-3.4.3 commands/generators/update.rb
rhoconnect-3.4.2 commands/generators/update.rb