[macos] Update fastlane script

This commit is contained in:
Alexander Yuzhin
2020-06-04 13:07:59 +03:00
parent c70abb15a7
commit 09a8b679d5

View File

@ -48,19 +48,37 @@ platform :mac do
verbose: true
)
version = get_version_number(
target: scheme
desc 'Get the version from plist'
version_number = get_info_plist_value(
path: "ONLYOFFICE/Resources/#{scheme}/Info.plist",
key: "CFBundleShortVersionString"
)
build_number = get_info_plist_value(
path: "ONLYOFFICE/Resources/#{scheme}/Info.plist",
key: "CFBundleVersion"
)
desc 'Prepare zip for delta update'
zip(
path: app,
output_path: "#{build}/#{scheme}-#{version}.zip"
output_path: "#{build}/#{scheme}-#{version_number}.zip"
)
desc 'Create DMG image'
sh("npm install appdmg")
sh("npx appdmg resources/appdmg.json ../#{build}/#{scheme}.dmg")
desc 'Creates a bump version commit'
commit_version_bump(
message: "[macos] Version bumped to v#{version_number}(#{build_number})",
force: true
)
desc 'Create a local tag with the new version'
add_git_tag(
tag: "macos/v#{version_number}-#{build_number}",
build_number: build_number
)
end
end