Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
[build] Fix XM version check
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutch committed Jan 14, 2017
1 parent 1d9c8ec commit b8adfbb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dependency_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NOT_INSTALLED_VERSION="-1"

XAMARIN_MAC_MIN_VERSION="2.3"
XAMARIN_MAC_VERSION=lambda { product_version ("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/bin/mmp") }
XAMARIN_MAC_VERSION=lambda { product_version ("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version") }
XAMARIN_MAC_URL="http://www.xamarin.com"

MONO_MIN_VERSION="4.2"
Expand Down Expand Up @@ -33,10 +33,9 @@ def mono_version(binary)
end
end

def product_version(binary)
if File.exist?("#{binary}")
version = `#{binary} --version`
return version.split(' ')[1]
def product_version(version_file)
if File.exist?(version_file)
return File.open(version_file, 'rb') { |f| f.read }
else
return NOT_INSTALLED_VERSION
end
Expand Down

0 comments on commit b8adfbb

Please sign in to comment.