Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created September 14, 2015 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/980e413a0b5a7a84652f to your computer and use it in GitHub Desktop.
Save anonymous/980e413a0b5a7a84652f to your computer and use it in GitHub Desktop.
serviceDir="C:\Path\To\VersionFile.txt"
targetVersion = "project=\"Node\" version=\"1.2.142.21205\" changeset=\"21205\" buildname=\"v2.3.333-Patches-ServiceFramework_20150312.1\""
versionFileContents = File.foreach("#{serviceDir}\\RampNode.version").first
puts "#{targetVersion}"
puts "#{versionFileContents}"
#NOTE: These 2 lines print and appear to be identical!
if "#{versionFileContents}" == "#{targetVersion}"
puts "IT MATCHES"
else puts "NO MATCHING VERSION"
end
#NOTE: This "if" never matches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment