Sha256: b408082d9d743e48e27cec554c3feec9a4ecea70a7fc0b0863b99d112cf312c7

Contents?: true

Size: 973 Bytes

Versions: 21

Compression:

Stored size: 973 Bytes

Contents

Execute.define_task do
  desc "update", "Update an existing application to the latest rhoconnect release"
  def update
    require 'bundler'
    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

21 entries across 21 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 commands/generators/update.rb
rhoconnect-7.5.1 commands/generators/update.rb
rhoconnect-7.4.1 commands/generators/update.rb
rhoconnect-7.1.17 commands/generators/update.rb
rhoconnect-6.2.0 commands/generators/update.rb
rhoconnect-6.0.11 commands/generators/update.rb
rhoconnect-5.5.18 commands/generators/update.rb
rhoconnect-5.5.17 commands/generators/update.rb
rhoconnect-5.5.15 commands/generators/update.rb
rhoconnect-5.5.0.22 commands/generators/update.rb
rhoconnect-5.5.2 commands/generators/update.rb
rhoconnect-5.5.0.7 commands/generators/update.rb
rhoconnect-5.5.0.3 commands/generators/update.rb
rhoconnect-5.5.0 commands/generators/update.rb
rhoconnect-5.1.1 commands/generators/update.rb
rhoconnect-4.0.4 commands/generators/update.rb
rhoconnect-4.0.3 commands/generators/update.rb
rhoconnect-4.0.2 commands/generators/update.rb
rhoconnect-4.0.1 commands/generators/update.rb
rhoconnect-4.0.0 commands/generators/update.rb