RiotGamesMinions / thor-scmversion

Thor tasks to manage a VERSION file based on SCM tags
MIT License
58 stars 22 forks source link

p4: command not found #27

Open johntdyer opened 10 years ago

johntdyer commented 10 years ago

Taking a look at this project and I am not getting very far. I had assumed this would work w/ a regular git repo, but I am guessing p4 is something for Perforce?

jdyer@retina:~/Projects/deployment_models/hosted-deployment-model/runtime_server(master⚡) » be thor version:current               1 ↵
sh: p4: command not found
/Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion/p4_version.rb:76:in `depot_path': undefined method `gsub' for nil:NilClass (NoMethodError)
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion/p4_version.rb:80:in `module_name'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion/p4_version.rb:57:in `block in all_from_path'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion/p4_version.rb:56:in `chdir'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion/p4_version.rb:56:in `all_from_path'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion/scm_version.rb:38:in `from_path'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion.rb:44:in `current_version'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion.rb:50:in `write_version'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-scmversion-1.2.1/lib/thor-scmversion.rb:38:in `current'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/runner.rb:36:in `method_missing'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:29:in `run'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:128:in `run'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/bin/thor:6:in `<top (required)>'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/bin/thor:23:in `load'
    from /Users/jdyer/.rbenv/versions/1.9.3-p429/bin/thor:23:in `<main>'
jdyer@retina:~/Projects/deployment_models/hosted-deployment-model/runtime_server(master⚡) »
johntdyer commented 10 years ago

This is related to https://github.com/RiotGames/thor-scmversion/pull/25. Looks liek it expects the cwd to contain the .git directory. Not sure yet if there is a way to point it to an alternate path