Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #231 from nwest/app-build-versions
Browse files Browse the repository at this point in the history
Use release date for the app's build version
  • Loading branch information
orta committed Jan 27, 2016
2 parents 33e8c47 + 578555e commit 8e1ea71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def install_cocoapods_version
@install_cocoapods_version = YAML.load(File.read(version_file))['last']
end

# Used to differentiate app builds from CocoaPods releases.
def cocoapods_app_build_version
require 'Date'
DateTime.now.strftime("%Y.%m.%d")
end

# ------------------------------------------------------------------------------
# Package metadata
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -967,7 +973,7 @@ namespace :app do
task :update_version do
info_plist = File.expand_path('app/CocoaPods/Supporting Files/Info.plist')
execute 'App', ['/usr/libexec/PlistBuddy', '-c', "Set :CFBundleShortVersionString #{install_cocoapods_version}", info_plist]
execute 'App', ['/usr/libexec/PlistBuddy', '-c', "Set :CFBundleVersion #{install_cocoapods_version}", info_plist]
execute 'App', ['/usr/libexec/PlistBuddy', '-c', "Set :CFBundleVersion #{cocoapods_app_build_version}", info_plist]
end

desc 'Prepare all prerequisites for building the app'
Expand Down

0 comments on commit 8e1ea71

Please sign in to comment.