infinitered / bluepotion

Like RedPotion, but for Android
MIT License
74 stars 18 forks source link

rake newclear "Not a git repository" #103

Closed bigtunacan closed 8 years ago

bigtunacan commented 8 years ago

Just setup a sample bluepotion app and everything worked up until I tried running rake newclear which produces the following output. ( I have Gradle 2.8 installed via Homebrew).

Cleaning Project...
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
ArgumentError: wrong number of arguments (2 for 1)
/Users/bigtunacan/.rvm/gems/ruby-2.2.1/gems/motion-gradle-2.0.1/lib/motion/project/gradle.rb:49:in `dependency'
/code/rubymotion/myapp/Rakefile:33:in `block (2 levels) in <top (required)>'
/Users/bigtunacan/.rvm/gems/ruby-2.2.1/gems/motion-gradle-2.0.1/lib/motion/project/gradle.rb:16:in `instance_eval'
/Users/bigtunacan/.rvm/gems/ruby-2.2.1/gems/motion-gradle-2.0.1/lib/motion/project/gradle.rb:16:in `gradle'
/code/rubymotion/myapp/Rakefile:31:in `block in <top (required)>'
/Library/RubyMotion/lib/motion/project/config.rb:121:in `call'
/Library/RubyMotion/lib/motion/project/config.rb:121:in `block in setup'
/Library/RubyMotion/lib/motion/project/config.rb:121:in `each'
/Library/RubyMotion/lib/motion/project/config.rb:121:in `setup'
/Library/RubyMotion/lib/motion/project/app.rb:66:in `config'
/Library/RubyMotion/lib/motion/project.rb:49:in `block in <top (required)>'
/Library/RubyMotion/lib/motion/project.rb:55:in `block (2 levels) in <top (required)>'
/Users/bigtunacan/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/Users/bigtunacan/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => clean
(See full trace by running task with --trace)
QuintinAdam commented 8 years ago

This is because of this line in the Rakefile. app.version_code = (git rev-list HEAD --count.strip.to_i).to_s

You will just want to run git init and commit the changes or change that line.

bigtunacan commented 8 years ago

@QuintinAdam Thanks. I updated this in my Rakefile after posting the issue here as a workaround, but forgot to close.