diff --git a/OrangeDesignSystemDemo/fastlane/Fastfile b/OrangeDesignSystemDemo/fastlane/Fastfile index 4bb93f57..243f1eb8 100644 --- a/OrangeDesignSystemDemo/fastlane/Fastfile +++ b/OrangeDesignSystemDemo/fastlane/Fastfile @@ -58,6 +58,10 @@ platform :ios do # ------------------------------------------------------------ desc "ADD APPS PLUS CREDENTIALS" lane :add_credentials_appsplus do + if APPS_PLUS_SERVICE_URL.nil? || APPS_PLUS_SERVICE_URL.empty? { + publish_mattermost_notification("⚠️ @channel Warning: APPS_PLUS_SERVICE_URL is not defined, are you aware of that?") + } + update_plist( plist_path: "OrangeDesignSystemDemo/Resources/Info.plist", block: proc do |plist| @@ -141,11 +145,11 @@ platform :ios do # ----------------------------------------------------------------------- private_lane :build_and_upload do |options| build - + tag_build if options[:upload] upload else - puts ">> Upload to testflight no requested" + puts "Upload to TestFlight no requested" end end @@ -188,6 +192,33 @@ platform :ios do end end + # ----------------------------------------------------------------------- + # PRIVATE LANE TO CREATE GIT TAG FOR CI + # ----------------------------------------------------------------------- + #private_lane :tag_build do + lane :tag_build do + begin + version = get_app_version + timestamp = sh 'date +%s' + timestamp = timestamp.strip! + prefix = version + "-" + + add_git_tag( + grouping: "qualif", + includes_lane: false, + prefix: prefix, + build_number: timestamp + ) + + expected_git_tag = "qualif/" + prefix + "/" + build_number + + publish_mattermost_notification"(📦 ✅ New Git tag created: '" + expected_git_tag + "'") + rescue => error + publish_mattermost_notification("📦 🚨 @channel Some issue occurred during the tagging step (:tag_build)") + raise error + end + end + # ----------------------------------------------------------------------- # PRIVATE LANE UPLOAD TO TESTFLIGHT (DEV / QUALIF / PROD is set by main lane) # ----------------------------------------------------------------------- @@ -271,7 +302,7 @@ platform :ios do ) end - puts "current relase notes = #{changelog}" + puts "Current relase notes = #{changelog}" return changelog end