Permalink
Browse files

add migrate-rhodes-app

  • Loading branch information...
1 parent 5f7d850 commit d40fbf160d6efa01c92b989c02b449b0a5ef172c @genywind genywind committed Oct 25, 2011
Showing with 40 additions and 0 deletions.
  1. +22 −0 bin/migrate-rhodes-app
  2. +2 −0 bin/migrate-rhodes-app.bat
  3. +16 −0 bin/set-rhodes-sdk_321
View
22 bin/migrate-rhodes-app
@@ -0,0 +1,22 @@
+#!/usr/bin/env ruby
+require 'rubygems'
+require 'yaml'
+require 'fileutils'
+include FileUtils
+puts File.dirname(__FILE__)
+
+if File.exists? "build.yml"
+ $app_config = YAML::load_file("build.yml")
+
+ unless $app_config["sdk"].nil?
+ $app_config["sdk"] = nil
+
+ File.open( 'build.yml', 'w' ) do |out|
+ YAML.dump( $app_config, out )
+ end
+
+ rakefilepath = File.join( `get-rhodes-info --rhodes-path`.chomp(), 'res/generators/templates/application/Rakefile' )
+ puts "Application Rakefile has been updated to use latest Rhodes gem."
+ cp rakefilepath, '.'
+ end
+end
View
2 bin/migrate-rhodes-app.bat
@@ -0,0 +1,2 @@
+@echo off
+ruby %~dp0migrate-rhodes-app
View
16 bin/set-rhodes-sdk_321
@@ -0,0 +1,16 @@
+#!/usr/bin/env ruby
+require 'rubygems'
+require 'yaml'
+require 'fileutils'
+include FileUtils
+puts File.dirname(__FILE__)
+
+if File.exists? "build.yml"
+ $app_config = YAML::load_file("build.yml")
+
+ $app_config["sdk"] = File.expand_path(File.dirname(__FILE__) + "/../")
+
+ File.open( 'build.yml', 'w' ) do |out|
+ YAML.dump( $app_config, out )
+ end
+end

0 comments on commit d40fbf1

Please sign in to comment.