Browse files

Fix :upload task; alias :publish to it.

  • Loading branch information...
1 parent 195e174 commit 9a2e3856511a62313251e772a8dd4f0c69463432 @technomancy technomancy committed Jan 27, 2011
Showing with 11 additions and 9 deletions.
  1. +11 −9 lib/dubious_tasks.rb
View
20 lib/dubious_tasks.rb
@@ -41,13 +41,19 @@ def init(src, war)
task :server => [name] do
check_for_updates
- $CLASSPATH << AppEngine::SDK::TOOLS_JAR
- Java.ComGoogleAppengineToolsAdmin.AppCfg.main([])
+ args = [
+ 'java', '-cp', TOOLS,
+ 'com.google.appengine.tools.KickStart',
+ 'com.google.appengine.tools.development.DevAppServerMain',
+ @war]
+ system *args
@done = true
@update_thread.join
end
- task :upload => [name] do
- Java::ComGoogleAppengineTools::AppCfg.main(
+
+ desc "publish to appengine"
+ task :upload => ['compile:app', name] do
+ Java::ComGoogleAppengineToolsAdmin::AppCfg.main(
['update', @war].to_java(:string))
end
@@ -188,11 +194,7 @@ def mirahc *files
MODEL_SRC_JAR = File.join(MIRAH_HOME, 'examples', 'appengine', 'war',
'WEB-INF', 'lib', 'dubydatastore.jar')
-#there is an upload task in appengine_tasks, but I couldn't get it to work
-desc "publish to appengine"
-task :publish => 'compile:app' do
- sh "appcfg.sh update ."
-end
+task :publish => :upload
desc "run development server"
task :server

0 comments on commit 9a2e385

Please sign in to comment.