class Terrestrial::Cli::DetectsProjectType

Public Class Methods

run() click to toggle source
# File lib/terrestrial/cli/detects_project_type.rb, line 5
def self.run
  files = Dir[Config[:directory] + "/**/*"]

  if files.any? {|f| f.end_with?(".xcodeproj") || f.end_with?(".xcworkspace")}
    "ios"
  elsif files.any? {|f| f.end_with?(".csproj") || f.end_with?(".unity") || f.end_with?(".unityproj")} 
    "unity"
  else
    "android"
  end
end