From 0bd69fcd6b78453f3c925fa6832ce52e2b494214 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 17 Jul 2017 12:45:58 -0400 Subject: [PATCH] Prepare for dot release 1.0.1 --- android/app/build.gradle | 4 +- fastlane/Fastfile | 154 +++++++++++++------ ios/Mattermost.xcodeproj/project.pbxproj | 4 +- ios/Mattermost/Info.plist | 180 +++++++++++------------ ios/MattermostTests/Info.plist | 4 +- 5 files changed, 203 insertions(+), 143 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index f13b9fb79..b0fa20492 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,8 +91,8 @@ android { applicationId "com.mattermost.react.native" minSdkVersion 16 targetSdkVersion 23 - versionCode 39 - versionName "1.0" + versionCode 1 + versionName "1.0.1" multiDexEnabled true ndk { abiFilters "armeabi-v7a", "x86" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index df86f82f1..8af2ce3cb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -3,7 +3,7 @@ skip_docs platform :ios do before_all do |lane| - if lane == :beta or lane == :release + if lane == :beta ensure_git_branch( branch: 'master' ) @@ -12,7 +12,7 @@ platform :ios do end after_all do |lane| - if lane == :beta or lane == :release + if lane == :beta reset_git_repo( force: true, skip_clean: true @@ -26,7 +26,7 @@ platform :ios do desc 'Build Release file' desc 'This will also make sure the profile is up to date' lane :dev do - match(type: 'adhoc') + match(type: 'adhoc', app_identifier: 'com.mattermost.rnbeta') build_ios({ release: false, @@ -39,7 +39,7 @@ platform :ios do desc 'Submit a new Beta Build to Apple TestFlight' desc 'This will also make sure the profile is up to date' lane :beta do - match(type: 'appstore') + match(type: 'appstore', app_identifier: 'com.mattermost.rnbeta') build_ios({ release: true, @@ -83,40 +83,52 @@ platform :ios do desc 'Deploy a new version to the App Store' lane :release do - match(type: 'appstore') + ensure_git_branch( + branch: 'master' + ) + + match(type: 'appstore', app_identifier: 'com.mattermost.rn') # snapshot + update_app_identifier( + xcodeproj: './ios/Mattermost.xcodeproj', + plist_path: 'Mattermost/Info.plist', + app_identifier: 'com.mattermost.rn' + ) + update_info_plist( + xcodeproj: './ios/Mattermost.xcodeproj', + plist_path: 'Mattermost/Info.plist', + display_name: 'Mattermost' + ) + + sh 'cp -R ../assets/release/icons/ios/* ../ios/Mattermost/Images.xcassets/AppIcon.appiconset/' + build_ios({ release: true, - increment_build: true, - ensure_git_status_clean: true, + increment_build: false, + ensure_git_status_clean: false, method: 'app-store' }) - deliver(force: true) + # deliver( + # force: true, + # skip_screenshots: true, + # skip_metadata: true, + # submit_for_review: false, #lets try this after the first release + # automatic_release: false #lets try this after the first release + # ) - commit = last_git_commit - - push_to_git_remote( - remote: 'origin', - local_branch: 'ios-release', - force: false, - tags: false - ) - - unless ENV['GITHUB_TOKEN'].nil? - create_pull_request( - api_token: ENV['GITHUB_TOKEN'], - repo: 'mattermost/mattermost-mobile', - head: 'mattermost:ios-release', - base: 'master', - title: "IOS #{commit[:message]}" - ) - end + ### We are going to publish the app to the testflight first and not deliver it directly to the app store + pilot(skip_waiting_for_build_processing: true) # frameit + reset_git_repo( + force: true, + skip_clean: true + ) + if ENV['MATTERMOST_WEBHOOK_URL'] appstore_url = ENV['APPSTORE_URL'] send_message_for_ios( @@ -198,7 +210,7 @@ end platform :android do before_all do |lane| - if lane == :alpha or lane == :release + if lane == :alpha ensure_git_branch( branch: 'master' ) @@ -207,7 +219,7 @@ platform :android do end after_all do |lane| - if lane == :alpha or lane == :release + if lane == :alpha reset_git_repo( force: true, skip_clean: true @@ -268,36 +280,84 @@ platform :android do desc 'Deploy a new version to Google Play' lane :release do + ensure_git_branch( + branch: 'master' + ) + android_change_package_identifier(newIdentifier: 'com.mattermost.rn', manifest: './android/app/src/main/AndroidManifest.xml') + android_change_string_app_name(newName: 'Mattermost', stringsFile: './android/app/src/main/res/values/strings.xml') + android_update_application_id(app_folder_name: 'android/app', application_id: 'com.mattermost.rn') + + sh 'mv ../android/app/src/main/java/com/mattermost/rnbeta/ ../android/app/src/main/java/com/mattermost/rn/' + sh 'cp -R ../assets/release/icons/android/* ../android/app/src/main/res/' + + find_replace_string( + path_to_file: './android/app/src/main/java/com/mattermost/rn/MainApplication.java', + old_string: 'return BuildConfig.DEBUG;', + new_string: 'return false;' + ) + + + find_replace_string( + path_to_file: './android/app/src/main/java/com/mattermost/rn/MainApplication.java', + old_string: 'package com.mattermost.rnbeta;', + new_string: 'package com.mattermost.rn;' + ) + + find_replace_string( + path_to_file: './android/app/src/main/java/com/mattermost/rn/CustomPushNotification.java', + old_string: 'package com.mattermost.rnbeta;', + new_string: 'package com.mattermost.rn;' + ) + + find_replace_string( + path_to_file: './android/app/src/main/java/com/mattermost/rn/MainActivity.java', + old_string: 'package com.mattermost.rnbeta;', + new_string: 'package com.mattermost.rn;' + ) + + find_replace_string( + path_to_file: './android/app/src/main/java/com/mattermost/rn/NotificationsLifecycleFacade.java', + old_string: 'package com.mattermost.rnbeta;', + new_string: 'package com.mattermost.rn;' + ) + + find_replace_string( + path_to_file: './android/app/BUCK', + old_string: 'package com.mattermost.rnbeta;', + new_string: 'package com.mattermost.rn;' + ) + + find_replace_string( + path_to_file: './fastlane/metadata/android/en-US/title.txt', + old_string: 'Mattermost Beta', + new_string: 'Mattermost;' + ) + build_android({ release: true, - increment_build: true, - ensure_git_status_clean: true + increment_build: false, + ensure_git_status_clean: false }) + # supply( + # track: "production", + # apk: "#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}", + # ) + + # We are going to upload the build to the beta lane and not directly to production so it can be promoted later supply( - track: "production", + track: 'beta', apk: "#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}", ) - commit = last_git_commit - push_to_git_remote( - remote: 'origin', - local_branch: 'android-release', - force: false, - tags: false + sh 'mv ../android/app/src/main/java/com/mattermost/rn/ ../android/app/src/main/java/com/mattermost/rnbeta/' + + reset_git_repo( + force: true, + skip_clean: true ) - unless ENV['GITHUB_TOKEN'].nil? - create_pull_request( - api_token: ENV['GITHUB_TOKEN'], - repo: 'mattermost/mattermost-mobile', - head: 'mattermost:android-release', - base: 'master', - title: "Android #{commit[:message]}" - ) - end - if ENV['MATTERMOST_WEBHOOK_URL'] google_play_url = ENV['GOOGLE_PLAY_URL'] send_message_for_android( diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index 0c913b271..0bc8be729 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -1320,7 +1320,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = UQ8HT4Q2XM; HEADER_SEARCH_PATHS = ( @@ -1353,7 +1353,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = UQ8HT4Q2XM; HEADER_SEARCH_PATHS = ( diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist index f1cd78d88..2b6c95a78 100644 --- a/ios/Mattermost/Info.plist +++ b/ios/Mattermost/Info.plist @@ -1,94 +1,94 @@ - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 39 - ITSAppUsesNonExemptEncryption - - LSRequiresIPhoneOS - - NSAllowsArbitraryLoads - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - NSCameraUsageDescription - Take a Photo or Video and upload it to your mattermost instance - NSLocationWhenInUseUsageDescription - - NSPhotoLibraryUsageDescription - Upload Photos and Videos to your Mattermost instance - UIAppFonts - - Entypo.ttf - EvilIcons.ttf - FontAwesome.ttf - Foundation.ttf - Ionicons.ttf - MaterialIcons.ttf - Octicons.ttf - Zocial.ttf - Entypo.ttf - EvilIcons.ttf - FontAwesome.ttf - Foundation.ttf - Ionicons.ttf - MaterialCommunityIcons.ttf - MaterialIcons.ttf - Octicons.ttf - SimpleLineIcons.ttf - Zocial.ttf - OpenSans-Bold.ttf - OpenSans-BoldItalic.ttf - OpenSans-ExtraBold.ttf - OpenSans-ExtraBoldItalic.ttf - OpenSans-Italic.ttf - OpenSans-Light.ttf - OpenSans-LightItalic.ttf - OpenSans-Regular.ttf - OpenSans-Semibold.ttf - OpenSans-SemiboldItalic.ttf - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0.1 + CFBundleSignature + ???? + CFBundleVersion + 1 + ITSAppUsesNonExemptEncryption + + LSRequiresIPhoneOS + + NSAllowsArbitraryLoads + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSCameraUsageDescription + Take a Photo or Video and upload it to your mattermost instance + NSLocationWhenInUseUsageDescription + + NSPhotoLibraryUsageDescription + Upload Photos and Videos to your Mattermost instance + UIAppFonts + + Entypo.ttf + EvilIcons.ttf + FontAwesome.ttf + Foundation.ttf + Ionicons.ttf + MaterialIcons.ttf + Octicons.ttf + Zocial.ttf + Entypo.ttf + EvilIcons.ttf + FontAwesome.ttf + Foundation.ttf + Ionicons.ttf + MaterialCommunityIcons.ttf + MaterialIcons.ttf + Octicons.ttf + SimpleLineIcons.ttf + Zocial.ttf + OpenSans-Bold.ttf + OpenSans-BoldItalic.ttf + OpenSans-ExtraBold.ttf + OpenSans-ExtraBoldItalic.ttf + OpenSans-Italic.ttf + OpenSans-Light.ttf + OpenSans-LightItalic.ttf + OpenSans-Regular.ttf + OpenSans-Semibold.ttf + OpenSans-SemiboldItalic.ttf + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist index 41b61470e..07841bd8b 100644 --- a/ios/MattermostTests/Info.plist +++ b/ios/MattermostTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleSignature ???? CFBundleVersion - 39 + 1