Add fastlane automation

This commit is contained in:
Florian Gabach
2018-12-10 17:22:05 +01:00
parent db3f5b2062
commit 016099a7c3
3 changed files with 42 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "cocoapods"
gem "fastlane"
+6
View File
@@ -0,0 +1,6 @@
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple email address
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
+32
View File
@@ -0,0 +1,32 @@
# Usage : bundle exec fastlane (patch | minor | major)
default_platform(:ios)
podspec_name = "OpenSourceController.podspec"
platform :ios do
desc "Release a new version with a patch bump_type"
lane :patch do
release("patch")
end
desc "Release a new version with a minor bump_type"
lane :minor do
release("minor")
end
desc "Release a new version with a major bump_type"
lane :major do
release("major")
end
def release(type)
pod_lib_lint
version = version_bump_podspec(path: podspec_name, bump_type: type)
git_add(path: podspec_name)
git_commit(path: [podspec_name], message: "#{version} release")
add_git_tag(tag: "#{version}")
push_to_git_remote
pod_push
end
end