From eebd15b67838eae81a6cbebd2f31c2437d3bb3c3 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Sun, 22 Sep 2013 19:30:16 +0000 Subject: Making a more robust version control version tracking. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87260 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/updateInfoPlist.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 macosx/updateInfoPlist.rb (limited to 'macosx/updateInfoPlist.rb') diff --git a/macosx/updateInfoPlist.rb b/macosx/updateInfoPlist.rb new file mode 100644 index 00000000..e022801c --- /dev/null +++ b/macosx/updateInfoPlist.rb @@ -0,0 +1,22 @@ +require 'osx/cocoa' +include OSX +OSX.require_framework 'ScriptingBridge' + +info = NSMutableDictionary.alloc.initWithContentsOfFile_(ARGV[0]) + +if info != nil then + ## could read the plist file + currentVersion = %x[bash version.sh] + + if currentVersion == "unknown" then + puts "version is invalid!" + else + puts "version is valid:" + currentVersion + + currentVersion = currentVersion.chomp + + info.setValue_forKey_(currentVersion, "CFBundleVersion") + + info.writeToFile_atomically_(ARGV[0] + "vers.plist", 0) + end +end \ No newline at end of file -- cgit v1.2.3