6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/ios-box/tools/build.rb', line 6
def prepare
require_xcode
update_cache
version = IOSBox.new.version
puts "Bundle Version: #{version[:bundle]}"
puts " Short Version: #{version[:short]}"
puts " Build: #{version[:build]}"
product_plist = File.join(ENV['BUILT_PRODUCTS_DIR'], ENV['INFOPLIST_PATH'])
`/usr/bin/plutil -convert xml1 \"#{product_plist}\"`
pl = Plist::parse_xml(product_plist)
if (pl)
pl["IBBuildNum"] = version[:build]
pl["IBBuildDate"] = Time.new.strftime("%a %e %b %Y %H:%M:%S %Z %z")
pl["IBBuildType"] = ENV['CONFIGURATION']
pl["GCGitCommitHash"] = version[:commit] pl.save_plist(product_plist)
end
`/usr/bin/plutil -convert binary1 \"#{product_plist}\"`
end
|