From 016099a7c393b00e4e8b8eddaf7a843e05e561d4 Mon Sep 17 00:00:00 2001 From: Florian Gabach Date: Mon, 10 Dec 2018 17:22:05 +0100 Subject: [PATCH] Add fastlane automation --- Gemfile | 4 ++++ fastlane/Appfile | 6 ++++++ fastlane/Fastfile | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 Gemfile create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..95d14ea --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "cocoapods" +gem "fastlane" \ No newline at end of file diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 0000000..1803063 --- /dev/null +++ b/fastlane/Appfile @@ -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 diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 0000000..bb64d5e --- /dev/null +++ b/fastlane/Fastfile @@ -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 \ No newline at end of file