Module: RakeHelper
- Defined in:
- lib/ipt/rake_helper.rb
Instance Method Summary collapse
-
#find_binary(name) ⇒ Object
Tries to determine the absolute path to the given binary.
- #find_current_project_name ⇒ Object
- #get_previous_version(current_version) ⇒ Object
- #resolve_tag ⇒ Object
Instance Method Details
#find_binary(name) ⇒ Object
Tries to determine the absolute path to the given binary.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ipt/rake_helper.rb', line 5 def find_binary(name) ENV["PATH"].split(":").each do |dir| # we are on a mac anyway path = File.join(dir, name) if File.executable?(path) puts "Found '#{name}' in #{dir}" if $DEBUG return File.(path) end end raise "Unable to find #{name} in the system PATH. Add /path/to/#{name} to your $PATH" end |
#find_current_project_name ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/ipt/rake_helper.rb', line 16 def find_current_project_name # Run xcodebuile in the current directory info = `xcodebuild -list` if info =~ /Targets:(.*?)Build Configurations/m return $1.dup.gsub(/\(Active\)/, '').strip end nil end |
#get_previous_version(current_version) ⇒ Object
31 32 33 34 |
# File 'lib/ipt/rake_helper.rb', line 31 def get_previous_version(current_version) = `#{GIT} tag -l`.split("\n") resolve_previous_version(, current_version) end |