From d2b5a062d6f9fa45dcc6707e957c9fbaa6625e1b Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 12:16:11 -0500 Subject: [PATCH 01/27] Try a build to Fabric --- .circleci/config.yml | 2 +- ios/TextilePhotos/Info.plist | 4 ++-- ios/fastlane/Fastfile | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4171e8393..0ff1782e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,7 +269,7 @@ jobs: - vendor/bundle - run: - command: bundle exec fastlane test + command: bundle exec fastlane adhoc working_directory: ios - run: diff --git a/ios/TextilePhotos/Info.plist b/ios/TextilePhotos/Info.plist index b50f4c0f4..1bbc61031 100644 --- a/ios/TextilePhotos/Info.plist +++ b/ios/TextilePhotos/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.8 + 0 CFBundleSignature ???? CFBundleVersion - 0 + dev Fabric APIKey diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 7f9d3ce82..ceff6098b 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -27,6 +27,23 @@ platform :ios do ) end + desc "Push internal test build to Fabric" + lane :adhoc do + match(type: "adhoc") + hash = ENV['CIRCLE_SHA1'] + build = hash[0...5] + increment_build_number( + build_number: build, + xcodeproj: "TextilePhotos.xcodeproj" + ) + gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") + crashlytics( + api_token: ENV['FABRIC_API_TOKEN'], + build_secret: ENV['FABRIC_BUILD_SECRET'] + ) + upload_symbols_to_crashlytics(dsym_path: "./TextilePhotos.app.dSYM.zip", api_token: ENV['FABRIC_API_TOKEN']) + end + desc "Push a new beta build to TestFlight" desc "This will also make sure the profile is up to date" lane :beta do From 180ce3e198d8a381a75711f8f520450189549767 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 12:29:25 -0500 Subject: [PATCH 02/27] Export method for gym --- ios/fastlane/Fastfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index ceff6098b..da6733bb5 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -36,7 +36,11 @@ platform :ios do build_number: build, xcodeproj: "TextilePhotos.xcodeproj" ) - gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") + gym( + workspace: "TextilePhotos.xcworkspace", + scheme: "TextilePhotos", + export_method: "ad-hoc" + ) crashlytics( api_token: ENV['FABRIC_API_TOKEN'], build_secret: ENV['FABRIC_BUILD_SECRET'] From b49c5671270fad0c05008344b203e3d18f5bc5aa Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 12:45:59 -0500 Subject: [PATCH 03/27] Trying to get signing right --- ios/fastlane/Fastfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index da6733bb5..d5afb546f 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -29,6 +29,13 @@ platform :ios do desc "Push internal test build to Fabric" lane :adhoc do + APP_ID = "io.textile.Wallet" + PROFILE = "match AdHoc io.textile.Wallet" + + settings_to_override = { + :PROVISIONING_PROFILE_SPECIFIER => PROFILE + } + match(type: "adhoc") hash = ENV['CIRCLE_SHA1'] build = hash[0...5] @@ -39,7 +46,13 @@ platform :ios do gym( workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos", - export_method: "ad-hoc" + xcargs: settings_to_override, + export_method: "ad-hoc", + export_options: { + provisioningProfiles: { + APP_ID => PROFILE + } + } ) crashlytics( api_token: ENV['FABRIC_API_TOKEN'], From ceea532c2b0a82b87da1bb678da3119a152cae9f Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 12:57:43 -0500 Subject: [PATCH 04/27] Time bases version --- ios/fastlane/Fastfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index d5afb546f..1b54bfd11 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -37,10 +37,9 @@ platform :ios do } match(type: "adhoc") - hash = ENV['CIRCLE_SHA1'] - build = hash[0...5] + time = Time.new() increment_build_number( - build_number: build, + build_number: time.to_i, xcodeproj: "TextilePhotos.xcodeproj" ) gym( From d27582109b22c2ac43857161ffddf1cc5b0ad5ae Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 13:09:47 -0500 Subject: [PATCH 05/27] User circle build number --- ios/fastlane/Fastfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 1b54bfd11..794f50f76 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -37,9 +37,8 @@ platform :ios do } match(type: "adhoc") - time = Time.new() increment_build_number( - build_number: time.to_i, + build_number: ENV['CIRCLE_BUILD_NUM'], xcodeproj: "TextilePhotos.xcodeproj" ) gym( From 75ae615e427785ee7387f82bdab3bb073f83f3b1 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 13:21:23 -0500 Subject: [PATCH 06/27] Distribute to group --- .circleci/config.yml | 28 ++++++++++++++-------------- ios/fastlane/Fastfile | 3 ++- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff1782e2..879985a3d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -272,20 +272,20 @@ jobs: command: bundle exec fastlane adhoc working_directory: ios - - run: - name: set up test results - working_directory: ios - when: always - command: | - mkdir -p test-results/fastlane test-results/xcode - mv fastlane/report.xml test-results/fastlane - mv fastlane/test_output/report.junit test-results/xcode/junit.xml - - - store_test_results: - path: ios/test-results - - - store_artifacts: - path: ios/test-results + # - run: + # name: set up test results + # working_directory: ios + # when: always + # command: | + # mkdir -p test-results/fastlane test-results/xcode + # mv fastlane/report.xml test-results/fastlane + # mv fastlane/test_output/report.junit test-results/xcode/junit.xml + + # - store_test_results: + # path: ios/test-results + + # - store_artifacts: + # path: ios/test-results ios-beta: macos: diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 794f50f76..6f3f64f55 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -54,7 +54,8 @@ platform :ios do ) crashlytics( api_token: ENV['FABRIC_API_TOKEN'], - build_secret: ENV['FABRIC_BUILD_SECRET'] + build_secret: ENV['FABRIC_BUILD_SECRET'], + groups: 'textile-internal' ) upload_symbols_to_crashlytics(dsym_path: "./TextilePhotos.app.dSYM.zip", api_token: ENV['FABRIC_API_TOKEN']) end From ff8900c09c94707b8367eecbc9cfc49b5ca900f9 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 14:01:50 -0500 Subject: [PATCH 07/27] Display version number on account screen --- App/SB/views/UserProfile/index.js | 3 +- App/SB/views/UserProfile/statics/styles.js | 7 +++ android/app/build.gradle | 1 + .../java/com/textile/MainApplication.java | 2 + android/settings.gradle | 2 + ios/TextilePhotos.xcodeproj/project.pbxproj | 45 +++++++++++++++++++ ios/fastlane/Fastfile | 2 - package.json | 1 + yarn.lock | 4 ++ 9 files changed, 64 insertions(+), 3 deletions(-) diff --git a/App/SB/views/UserProfile/index.js b/App/SB/views/UserProfile/index.js index 44cf0714d..f0ee255af 100644 --- a/App/SB/views/UserProfile/index.js +++ b/App/SB/views/UserProfile/index.js @@ -5,6 +5,7 @@ import { NavigationActions } from 'react-navigation' import ImageSc from 'react-native-scalable-image' import Toast, { DURATION } from 'react-native-easy-toast' import HeaderButtons, { Item } from 'react-navigation-header-buttons' +import VersionNumber from 'react-native-version-number' import { TextileHeaderButtons, Item as TextileItem } from '../../../Components/HeaderButtons' @@ -104,9 +105,9 @@ class UserProfile extends React.PureComponent { + {VersionNumber.appVersion} ({VersionNumber.buildVersion}) {this.connectivity()} - Notifications diff --git a/App/SB/views/UserProfile/statics/styles.js b/App/SB/views/UserProfile/statics/styles.js index 87aebbf24..5d2e6f2a9 100644 --- a/App/SB/views/UserProfile/statics/styles.js +++ b/App/SB/views/UserProfile/statics/styles.js @@ -76,6 +76,7 @@ export default StyleSheet.create({ paddingVertical: 25 }, serversText: { + fontFamily: 'BentonSans', color: '#4A4A4A' }, activeIcon: { @@ -103,6 +104,12 @@ export default StyleSheet.create({ alignItems: 'center', marginTop: 30 }, + versionDescription: { + fontFamily: 'BentonSans', + fontSize: 12, + marginTop: 8, + color: 'rgb(200,200,200)' + }, subScreen: { backgroundColor: '#FAFCFE', paddingTop: 75, diff --git a/android/app/build.gradle b/android/app/build.gradle index 60df3d06b..0974e8f71 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -171,6 +171,7 @@ android { } dependencies { + compile project(':react-native-version-number') compile project(':react-native-push-notification') compile project(':react-native-fabric') compile project(':react-native-image-picker') diff --git a/android/app/src/main/java/com/textile/MainApplication.java b/android/app/src/main/java/com/textile/MainApplication.java index c0d92c69d..b9b970ba1 100644 --- a/android/app/src/main/java/com/textile/MainApplication.java +++ b/android/app/src/main/java/com/textile/MainApplication.java @@ -19,6 +19,7 @@ import com.textile.textilenode.TextileNodePackage; import com.transistorsoft.rnbackgroundfetch.RNBackgroundFetchPackage; import com.vydia.RNUploader.UploaderReactPackage; +import com.apsl.versionnumber.RNVersionNumberPackage; import java.util.Arrays; import java.util.List; @@ -36,6 +37,7 @@ protected List getPackages() { return Arrays.asList( new FabricPackage(), new MainReactPackage(), + new RNVersionNumberPackage(), new ReactNativePushNotificationPackage(), new UploaderReactPackage(), new ImagePickerPackage(), diff --git a/android/settings.gradle b/android/settings.gradle index 0064bc4df..e14ca7226 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'Textile' +include ':react-native-version-number' +project(':react-native-version-number').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-number/android') include ':react-native-push-notification' project(':react-native-push-notification').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-push-notification/android') include ':react-native-fabric' diff --git a/ios/TextilePhotos.xcodeproj/project.pbxproj b/ios/TextilePhotos.xcodeproj/project.pbxproj index a767b7c8f..47f4c6d3c 100644 --- a/ios/TextilePhotos.xcodeproj/project.pbxproj +++ b/ios/TextilePhotos.xcodeproj/project.pbxproj @@ -54,6 +54,7 @@ 932E4DC520B8D7E100358ED3 /* Biotif-SemiBoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 932E4DB520B8D7E000358ED3 /* Biotif-SemiBoldItalic.ttf */; }; 932E4DC620B8D7E100358ED3 /* Biotif-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 932E4DB620B8D7E100358ED3 /* Biotif-Light.ttf */; }; 932E4DC720B8D7E100358ED3 /* Biotif-BookItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 932E4DB720B8D7E100358ED3 /* Biotif-BookItalic.ttf */; }; + 9331F517214D890B00E37A58 /* libRNVersionNumber.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9331F514214D88F300E37A58 /* libRNVersionNumber.a */; }; 9345CEA92102B24E0061EFD6 /* BentonSans.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9345CEA62102B24D0061EFD6 /* BentonSans.otf */; }; 9345CEAD2102B68A0061EFD6 /* BentonSans-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9345CEAB2102B68A0061EFD6 /* BentonSans-Light.otf */; }; 9345CEAE2102B68A0061EFD6 /* BentonSans-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9345CEAC2102B68A0061EFD6 /* BentonSans-Bold.otf */; }; @@ -276,6 +277,20 @@ remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; + 9331F513214D88F300E37A58 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9331F50E214D88F300E37A58 /* RNVersionNumber.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RNVersionNumber; + }; + 9331F515214D88F300E37A58 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9331F50E214D88F300E37A58 /* RNVersionNumber.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2858ECD01F8B91B400610575; + remoteInfo = "RNVersionNumber-tvOS"; + }; 935215C4207E966C00D46B81 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 935215BC207E966B00D46B81 /* ART.xcodeproj */; @@ -578,6 +593,7 @@ 932E4DB520B8D7E000358ED3 /* Biotif-SemiBoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Biotif-SemiBoldItalic.ttf"; path = "../App/Fonts/Biotif-SemiBoldItalic.ttf"; sourceTree = ""; }; 932E4DB620B8D7E100358ED3 /* Biotif-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Biotif-Light.ttf"; path = "../App/Fonts/Biotif-Light.ttf"; sourceTree = ""; }; 932E4DB720B8D7E100358ED3 /* Biotif-BookItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Biotif-BookItalic.ttf"; path = "../App/Fonts/Biotif-BookItalic.ttf"; sourceTree = ""; }; + 9331F50E214D88F300E37A58 /* RNVersionNumber.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNVersionNumber.xcodeproj; path = "../node_modules/react-native-version-number/ios/RNVersionNumber.xcodeproj"; sourceTree = ""; }; 9345CEA62102B24D0061EFD6 /* BentonSans.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = BentonSans.otf; path = ../App/Fonts/BentonSans.otf; sourceTree = ""; }; 9345CEAB2102B68A0061EFD6 /* BentonSans-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "BentonSans-Light.otf"; path = "../App/Fonts/BentonSans-Light.otf"; sourceTree = ""; }; 9345CEAC2102B68A0061EFD6 /* BentonSans-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "BentonSans-Bold.otf"; path = "../App/Fonts/BentonSans-Bold.otf"; sourceTree = ""; }; @@ -628,6 +644,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 9331F517214D890B00E37A58 /* libRNVersionNumber.a in Frameworks */, 93A9BDD321471BDC00BE4CE2 /* Mobile.framework in Frameworks */, A209E2322127748D0017E147 /* libRCTPushNotification.a in Frameworks */, 93B0F54F2119075100151B63 /* libSMXCrashlytics.a in Frameworks */, @@ -866,6 +883,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( + 9331F50E214D88F300E37A58 /* RNVersionNumber.xcodeproj */, A209E2292127747E0017E147 /* RCTPushNotification.xcodeproj */, 93B0F50A2119072900151B63 /* SMXCrashlytics.xcodeproj */, 93E3D607210E67E7000EB402 /* RNImagePicker.xcodeproj */, @@ -933,6 +951,15 @@ name = Products; sourceTree = ""; }; + 9331F50F214D88F300E37A58 /* Products */ = { + isa = PBXGroup; + children = ( + 9331F514214D88F300E37A58 /* libRNVersionNumber.a */, + 9331F516214D88F300E37A58 /* libRNVersionNumber-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; 9339E99E205C381700BCA4CF /* NativeModules */ = { isa = PBXGroup; children = ( @@ -1267,6 +1294,10 @@ ProductGroup = 93F072192051A31A0066155B /* Products */; ProjectRef = BCE1D0D0A2DC49468796E22E /* RNVectorIcons.xcodeproj */; }, + { + ProductGroup = 9331F50F214D88F300E37A58 /* Products */; + ProjectRef = 9331F50E214D88F300E37A58 /* RNVersionNumber.xcodeproj */; + }, { ProductGroup = 93B0F50B2119072900151B63 /* Products */; ProjectRef = 93B0F50A2119072900151B63 /* SMXCrashlytics.xcodeproj */; @@ -1474,6 +1505,20 @@ remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 9331F514214D88F300E37A58 /* libRNVersionNumber.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRNVersionNumber.a; + remoteRef = 9331F513214D88F300E37A58 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9331F516214D88F300E37A58 /* libRNVersionNumber-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRNVersionNumber-tvOS.a"; + remoteRef = 9331F515214D88F300E37A58 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 935215C5207E966C00D46B81 /* libART.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 6f3f64f55..e3d75e42b 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -31,11 +31,9 @@ platform :ios do lane :adhoc do APP_ID = "io.textile.Wallet" PROFILE = "match AdHoc io.textile.Wallet" - settings_to_override = { :PROVISIONING_PROFILE_SPECIFIER => PROFILE } - match(type: "adhoc") increment_build_number( build_number: ENV['CIRCLE_BUILD_NUM'], diff --git a/package.json b/package.json index 5b1e55324..239b8af68 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "react-native-push-notification": "^3.1.1", "react-native-scalable-image": "^0.4.0", "react-native-vector-icons": "^4.6.0", + "react-native-version-number": "^0.3.4", "react-navigation": "^2.11.2", "react-navigation-header-buttons": "^2.1.0", "react-redux": "^5.0.7", diff --git a/yarn.lock b/yarn.lock index 1044977bc..5a0fbde9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6082,6 +6082,10 @@ react-native-vector-icons@^4.6.0: prop-types "^15.5.10" yargs "^8.0.2" +react-native-version-number@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/react-native-version-number/-/react-native-version-number-0.3.4.tgz#4850e1a40ea719ee43092812d0693f9dc3be5f40" + react-native@0.55.3: version "0.55.3" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.55.3.tgz#6ff1691bd0645d0480fba16377edb9dce5bd28c4" From 4d9b8dfb5a091eced6fd256bedb8fb87be328533 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 16:10:55 -0500 Subject: [PATCH 08/27] Creating a release lane --- ios/fastlane/Fastfile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index e3d75e42b..0d4ac97ff 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -88,11 +88,24 @@ platform :ios do desc "Deploy a new version to the App Store" lane :release do - match(type: "appstore") - # snapshot - gym # Build your app - more options available + match(type: "appstore") # more information: https://codesigning.guide + tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 + parts = tag.split('_') + increment_version_number( + build_number: parts[1], + xcodeproj: "TextilePhotos.xcodeproj" + ) + increment_build_number( + build_number: parts[2], + xcodeproj: "TextilePhotos.xcodeproj" + ) + gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") deliver(force: true) - # frameit + # changelog_from_git_commits + upload_to_testflight(skip_waiting_for_build_processing: true) + upload_symbols_to_crashlytics(dsym_path: "./TextilePhotos.app.dSYM.zip", api_token: ENV['FABRIC_API_TOKEN']) + add_git_tag(tag: "builds/iosbeta/" + versionNumber.to_s + "(" + newBuildNumber.to_s + ")") + push_to_git_remote end after_all do |lane| From 993013f5b772437b9985b2c30830f91549f6e9ed Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 17:11:55 -0500 Subject: [PATCH 09/27] Try fastlane release --- .circleci/config.yml | 2 +- ios/fastlane/Fastfile | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 879985a3d..72f02675e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,7 +269,7 @@ jobs: - vendor/bundle - run: - command: bundle exec fastlane adhoc + command: bundle exec fastlane release working_directory: ios # - run: diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 0d4ac97ff..275f213a6 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -92,20 +92,17 @@ platform :ios do tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 parts = tag.split('_') increment_version_number( - build_number: parts[1], + # version_number: parts[1], + version_number: "0.4.9", xcodeproj: "TextilePhotos.xcodeproj" ) increment_build_number( - build_number: parts[2], + # build_number: parts[2], + build_number: 1, xcodeproj: "TextilePhotos.xcodeproj" ) gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") deliver(force: true) - # changelog_from_git_commits - upload_to_testflight(skip_waiting_for_build_processing: true) - upload_symbols_to_crashlytics(dsym_path: "./TextilePhotos.app.dSYM.zip", api_token: ENV['FABRIC_API_TOKEN']) - add_git_tag(tag: "builds/iosbeta/" + versionNumber.to_s + "(" + newBuildNumber.to_s + ")") - push_to_git_remote end after_all do |lane| From 173621d64983182c59efb4cf962815ed4748b2e2 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 17:18:21 -0500 Subject: [PATCH 10/27] Comment out while testing --- ios/fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 275f213a6..b9b1ea9c6 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -89,8 +89,8 @@ platform :ios do desc "Deploy a new version to the App Store" lane :release do match(type: "appstore") # more information: https://codesigning.guide - tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 - parts = tag.split('_') + # tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 + # parts = tag.split('_') increment_version_number( # version_number: parts[1], version_number: "0.4.9", From fe1dc1733d42c123e84d1fcd315aceb163107bef Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 17:36:53 -0500 Subject: [PATCH 11/27] Try some version number settings --- ios/fastlane/Fastfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index b9b1ea9c6..47a24bfab 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -89,20 +89,25 @@ platform :ios do desc "Deploy a new version to the App Store" lane :release do match(type: "appstore") # more information: https://codesigning.guide - # tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 - # parts = tag.split('_') + tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 + parts = tag.split('_') + versionNumber = "0.4.9" increment_version_number( # version_number: parts[1], - version_number: "0.4.9", + version_number: versionNumber, xcodeproj: "TextilePhotos.xcodeproj" ) increment_build_number( # build_number: parts[2], - build_number: 1, + build_number: 2, xcodeproj: "TextilePhotos.xcodeproj" ) gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") - deliver(force: true) + deliver( + force: true, + app_version: versionNumber, + skip_app_version_update: true + ) end after_all do |lane| From d0d5e394e68d8695c8052bb33c07c7bfbbd70c42 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 17:41:26 -0500 Subject: [PATCH 12/27] Comment out error --- ios/fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 47a24bfab..d30ccc234 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -89,8 +89,8 @@ platform :ios do desc "Deploy a new version to the App Store" lane :release do match(type: "appstore") # more information: https://codesigning.guide - tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 - parts = tag.split('_') + # tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 + # parts = tag.split('_') versionNumber = "0.4.9" increment_version_number( # version_number: parts[1], From 6242a91b670cb5d44e4d8ed65d5c52c64c2dc87c Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 15 Sep 2018 17:57:05 -0500 Subject: [PATCH 13/27] Try a versioning setting --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index d30ccc234..289f84060 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -106,7 +106,7 @@ platform :ios do deliver( force: true, app_version: versionNumber, - skip_app_version_update: true + skip_app_version_update: false ) end From 15ecebb1e6557b2fac553b9b94073d064690feaf Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 22 Sep 2018 22:54:27 -0600 Subject: [PATCH 14/27] First cut at tag release config --- .circleci/config.yml | 86 +++++++++++++++++++++++++++++++++++++++++-- ios/fastlane/Fastfile | 11 ++---- 2 files changed, 87 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72f02675e..547fef1aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -287,7 +287,7 @@ jobs: # - store_artifacts: # path: ios/test-results - ios-beta: + ios-adhoc: macos: xcode: "9.4.0" environment: @@ -356,7 +356,81 @@ jobs: command: echo $TEXTILE_ENV_CONTENTS_BASE64 | base64 --decode > .env.production - run: - command: bundle exec fastlane beta + command: bundle exec fastlane adhoc + working_directory: ios + + - store_artifacts: + path: ./ios/TextilePhotos.app.dSYM.zip + + - store_artifacts: + path: ./ios/TextilePhotos.ipa + + ios-release: + macos: + xcode: "9.4.0" + environment: + LC_ALL: en_US.UTF-8 + LANG: en_US.UTF-8 + working_directory: ~/textile-mobile + + # use a --login shell so our "set Ruby version" command gets picked up for later steps + shell: /bin/bash --login -o pipefail + + steps: + - run: + name: set Ruby version + command: echo "ruby-2.4" > ~/.ruby-version + + - restore_cache: # If any cache exists, it'll way speedup these checkouts + keys: + - source-v2-{{ arch }}-{{ .Branch }}-{{ .Revision }} + - source-v2-{{ arch }}-{{ .Branch }}- + - source-v2-{{ arch }}- + + - checkout + + - save_cache: + key: source-v2-{{ arch }}-{{ .Branch }}-{{ .Revision }} + paths: + - ".git" + + - restore_cache: + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + + - restore_cache: + key: node-v1-{{ checksum "package.json" }}-{{ arch }} + + # not using a workspace here as Node and Yarn versions + # differ between our macOS executor image and the Docker containers above + - run: yarn install --ignore-engines + + - save_cache: + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + paths: + - ~/.cache/yarn + + - save_cache: + key: node-v1-{{ checksum "package.json" }}-{{ arch }} + paths: + - node_modules + + - restore_cache: + key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} + + - run: + command: bundle install + working_directory: ios + + - save_cache: + key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} + paths: + - vendor/bundle + + - run: + command: echo $TEXTILE_ENV_CONTENTS_BASE64 | base64 --decode > .env.production + + - run: + command: bundle exec fastlane release working_directory: ios - store_artifacts: @@ -395,7 +469,7 @@ workflows: branches: ignore: - master - - ios-beta: + - ios-adhoc: filters: branches: only: @@ -405,3 +479,9 @@ workflows: branches: only: - master + - ios-release: + filters: + tags: + only: /^ios_[0-9.]+_[0-9]+/ + branches: + ignore: /.*/ diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 752ca422f..a05d1b16f 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -89,17 +89,14 @@ platform :ios do desc "Deploy a new version to the App Store" lane :release do match(type: "appstore") # more information: https://codesigning.guide - # tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 - # parts = tag.split('_') - versionNumber = "0.4.9" + tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 + parts = tag.split('_') increment_version_number( - # version_number: parts[1], - version_number: versionNumber, + version_number: parts[1], xcodeproj: "TextilePhotos.xcodeproj" ) increment_build_number( - # build_number: parts[2], - build_number: 2, + build_number: parts[2], xcodeproj: "TextilePhotos.xcodeproj" ) gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") From e3fe2395247c2cec8e922147eada8ba23ef00dd6 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 22 Sep 2018 23:07:24 -0600 Subject: [PATCH 15/27] Revert to tests for branch build --- .circleci/config.yml | 26 +++++++++++++------------- ios/fastlane/Fastfile | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 547fef1aa..0a5140233 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,23 +269,23 @@ jobs: - vendor/bundle - run: - command: bundle exec fastlane release + command: bundle exec fastlane test working_directory: ios - # - run: - # name: set up test results - # working_directory: ios - # when: always - # command: | - # mkdir -p test-results/fastlane test-results/xcode - # mv fastlane/report.xml test-results/fastlane - # mv fastlane/test_output/report.junit test-results/xcode/junit.xml + - run: + name: set up test results + working_directory: ios + when: always + command: | + mkdir -p test-results/fastlane test-results/xcode + mv fastlane/report.xml test-results/fastlane + mv fastlane/test_output/report.junit test-results/xcode/junit.xml - # - store_test_results: - # path: ios/test-results + - store_test_results: + path: ios/test-results - # - store_artifacts: - # path: ios/test-results + - store_artifacts: + path: ios/test-results ios-adhoc: macos: diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index a05d1b16f..64d7a776b 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -90,7 +90,7 @@ platform :ios do lane :release do match(type: "appstore") # more information: https://codesigning.guide tag = ENV['CIRCLE_TAG'] # looks like ios_1.2.3_456 - parts = tag.split('_') + parts = tag.split("_") increment_version_number( version_number: parts[1], xcodeproj: "TextilePhotos.xcodeproj" From db381c77b73b160450dfb42dac1c5a0fb69f7532 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 22 Sep 2018 23:27:56 -0600 Subject: [PATCH 16/27] Get rid of source cache restore for ios release build --- .circleci/config.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a5140233..920587751 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -381,19 +381,8 @@ jobs: name: set Ruby version command: echo "ruby-2.4" > ~/.ruby-version - - restore_cache: # If any cache exists, it'll way speedup these checkouts - keys: - - source-v2-{{ arch }}-{{ .Branch }}-{{ .Revision }} - - source-v2-{{ arch }}-{{ .Branch }}- - - source-v2-{{ arch }}- - - checkout - - save_cache: - key: source-v2-{{ arch }}-{{ .Branch }}-{{ .Revision }} - paths: - - ".git" - - restore_cache: key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} From 2afc87d2546c2c4f3703797078c89905e0ef94ae Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Sat, 22 Sep 2018 23:40:40 -0600 Subject: [PATCH 17/27] Fix version number in deliver --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 64d7a776b..c229a7250 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -102,7 +102,7 @@ platform :ios do gym(workspace: "TextilePhotos.xcworkspace", scheme: "TextilePhotos") deliver( force: true, - app_version: versionNumber, + app_version: parts[1], skip_app_version_update: false ) end From e23ce10ad4f80996135092f00edc8bd906e1c913 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 09:00:52 -0500 Subject: [PATCH 18/27] Update Fastlane and plugins --- android/Gemfile.lock | 20 +++++++++++--------- android/fastlane/Pluginfile | 4 +--- ios/Gemfile.lock | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/android/Gemfile.lock b/android/Gemfile.lock index 30b164a92..984ba4df0 100644 --- a/android/Gemfile.lock +++ b/android/Gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: git://github.com/cball/fastlane-plugin-android_versioning.git + revision: 4fe9f3dd3109d58dc5870c417d7b17b016585a8d + ref: support-blank-id-suffix + specs: + fastlane-plugin-android_versioning (0.3.1) + GEM remote: https://rubygems.org/ specs: @@ -18,7 +25,7 @@ GEM dotenv (2.5.0) emoji_regex (0.1.1) excon (0.62.0) - faraday (0.15.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) @@ -26,7 +33,7 @@ GEM faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) fastimage (2.1.4) - fastlane (2.104.0) + fastlane (2.105.2) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -62,9 +69,6 @@ GEM xcodeproj (>= 1.6.0, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) - fastlane-plugin-get_version_code (0.2.0) - fastlane-plugin-get_version_name (0.2.2) - fastlane-plugin-increment_version_code (0.4.3) gh_inspector (1.1.3) google-api-client (0.23.9) addressable (~> 2.5, >= 2.5.1) @@ -108,7 +112,7 @@ GEM rouge (2.0.7) rubyzip (1.2.2) security (0.1.3) - signet (0.9.1) + signet (0.10.0) addressable (~> 2.3) faraday (~> 0.9) jwt (>= 1.5, < 3.0) @@ -147,9 +151,7 @@ PLATFORMS DEPENDENCIES dotenv fastlane - fastlane-plugin-get_version_code - fastlane-plugin-get_version_name - fastlane-plugin-increment_version_code + fastlane-plugin-android_versioning! BUNDLED WITH 1.16.2 diff --git a/android/fastlane/Pluginfile b/android/fastlane/Pluginfile index 25e37f291..dcae787ae 100644 --- a/android/fastlane/Pluginfile +++ b/android/fastlane/Pluginfile @@ -2,6 +2,4 @@ # # Ensure this file is checked in to source control! -gem 'fastlane-plugin-increment_version_code' -gem 'fastlane-plugin-get_version_code' -gem 'fastlane-plugin-get_version_name' +gem 'fastlane-plugin-android_versioning', github: "cball/fastlane-plugin-android_versioning", ref: "support-blank-id-suffix" diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 9f7a62fde..e27797787 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -18,7 +18,7 @@ GEM dotenv (2.5.0) emoji_regex (0.1.1) excon (0.62.0) - faraday (0.15.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) @@ -26,7 +26,7 @@ GEM faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) fastimage (2.1.4) - fastlane (2.104.0) + fastlane (2.105.2) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -105,7 +105,7 @@ GEM rouge (2.0.7) rubyzip (1.2.2) security (0.1.3) - signet (0.9.1) + signet (0.10.0) addressable (~> 2.3) faraday (~> 0.9) jwt (>= 1.5, < 3.0) From aea02afa742aa1808885dd821ec1f9fed27fcf6f Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 09:46:29 -0500 Subject: [PATCH 19/27] Android adhoc lane --- .circleci/config.yml | 18 +++++++----------- android/app/build.gradle | 4 ++-- android/fastlane/Fastfile | 14 ++++++++++++++ android/fastlane/README.md | 5 +++++ 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 920587751..f12f2a7c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -149,7 +149,7 @@ jobs: - store_artifacts: path: android/test-results - android-beta: + android-adhoc: environment: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 @@ -180,10 +180,6 @@ jobs: - run: yarn install - - run: git config --global user.name $CIRCLE_USERNAME - - run: git config --global user.email "ops@textile.io" # TODO: Use a variable here - - run: git branch --set-upstream-to=origin/$CIRCLE_BRANCH $CIRCLE_BRANCH - - restore_cache: key: bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} @@ -204,7 +200,7 @@ jobs: command: echo $TEXTILE_ENV_CONTENTS_BASE64 | base64 --decode > .env.production - run: - command: bundle exec fastlane beta + command: bundle exec fastlane adhoc working_directory: android ios: @@ -463,11 +459,11 @@ workflows: branches: only: - master - - android-beta: - filters: - branches: - only: - - master + - android-adhoc: + # filters: + # branches: + # only: + # - master - ios-release: filters: tags: diff --git a/android/app/build.gradle b/android/app/build.gradle index e7d577ceb..54a24857a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -126,8 +126,8 @@ android { } vectorDrawables.useSupportLibrary = true - versionName "1.6.8" - versionCode 214 + versionName "0" + versionCode 0 } splits { diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 01b5b1e6c..5a2da7eda 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -29,6 +29,20 @@ platform :android do ) end + desc "Push internal test build to Fabric" + lane :adhoc do + set_version_code(version: ENV['CIRCLE_BUILD_NUM']) + gradle( + task: "clean assembleRelease", + flags: "--init-script init.gradle" + ) + crashlytics( + api_token: ENV['FABRIC_API_TOKEN'], + build_secret: ENV['FABRIC_BUILD_SECRET'], + groups: 'textile-internal' + ) + end + desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do versionCodes = google_play_track_version_codes(track: "internal") diff --git a/android/fastlane/README.md b/android/fastlane/README.md index 739a20bcd..8b79d0c63 100644 --- a/android/fastlane/README.md +++ b/android/fastlane/README.md @@ -21,6 +21,11 @@ or alternatively using `brew cask install fastlane` fastlane android test ``` Runs all the tests +### android adhoc +``` +fastlane android adhoc +``` +Push internal test build to Fabric ### android beta ``` fastlane android beta From 0ded1d0829ffcbe51f51e02533087170e37c7a8b Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 09:48:24 -0500 Subject: [PATCH 20/27] Fix config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f12f2a7c5..87346ea58 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -460,10 +460,10 @@ workflows: only: - master - android-adhoc: - # filters: - # branches: - # only: - # - master + filters: + branches: + only: + - asutula/new-builds - ios-release: filters: tags: From bf7815fb4f41223ca43c05faf41768a64afc90a7 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 10:19:54 -0500 Subject: [PATCH 21/27] Create android release job --- .circleci/config.yml | 51 +++++++++++++++++++++++++++++++++++++- android/fastlane/Fastfile | 24 +++++++++++++----- android/fastlane/README.md | 5 ++++ 3 files changed, 73 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87346ea58..fc75dcd96 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -203,6 +203,49 @@ jobs: command: bundle exec fastlane adhoc working_directory: android + android-release: + environment: + LC_ALL: en_US.UTF-8 + LANG: en_US.UTF-8 + working_directory: ~/textile-mobile + docker: + - image: circleci/android:api-26-node8-alpha + resource_class: large + steps: + - checkout: + path: ~/textile-mobile + + - restore_cache: + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + + - restore_cache: + key: node-v1-{{ checksum "package.json" }}-{{ arch }} + + - run: yarn install + + - restore_cache: + key: bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} + + - run: + command: bundle install + working_directory: android + + - save_cache: + key: bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} + paths: + - vendor/bundle + + - run: + command: echo $ANDROID_KEYSTORE_BASE64 | base64 --decode >> $ANDROID_KEYSTORE + working_directory: android + + - run: + command: echo $TEXTILE_ENV_CONTENTS_BASE64 | base64 --decode > .env.production + + - run: + command: bundle exec fastlane release + working_directory: android + ios: macos: xcode: "9.4.0" @@ -463,10 +506,16 @@ workflows: filters: branches: only: - - asutula/new-builds + - master - ios-release: filters: tags: only: /^ios_[0-9.]+_[0-9]+/ branches: ignore: /.*/ + - android-release: + filters: + tags: + only: /^android_[0-9.]+_[0-9]+/ + branches: + ignore: /.*/ diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 5a2da7eda..041787bca 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -17,10 +17,6 @@ default_platform(:android) platform :android do - def set_version_code(gradle_build: 'app/build.gradle', version: 0) - sh %Q{cd ../ && echo "$(awk '{sub(/versionCode [0-9]+$/,"versionCode "#{version})}1' #{gradle_build})" > #{gradle_build}.tmp && mv #{gradle_build}.tmp #{gradle_build} && cd -} - end - desc "Runs all the tests" lane :test do gradle( @@ -31,7 +27,7 @@ platform :android do desc "Push internal test build to Fabric" lane :adhoc do - set_version_code(version: ENV['CIRCLE_BUILD_NUM']) + increment_version_code(version_code: ENV['CIRCLE_BUILD_NUM']) gradle( task: "clean assembleRelease", flags: "--init-script init.gradle" @@ -46,7 +42,7 @@ platform :android do desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do versionCodes = google_play_track_version_codes(track: "internal") - set_version_code(version: versionCodes[0] + 1) + increment_version_code(version_code: versionCodes[0] + 1) gradle( task: "clean assembleRelease", flags: "--init-script init.gradle" @@ -67,6 +63,22 @@ platform :android do push_to_git_remote end + desc "Submit a new release to Google Play Store" + lane :release do + tag = ENV['CIRCLE_TAG'] # looks like android_1.2.3_456 + parts = tag.split("_") + increment_version_name(version_name: parts[1]) + increment_version_code(version_code: parts[2]) + gradle( + task: "clean assembleRelease", + flags: "--init-script init.gradle" + ) + # changelog_from_git_commits + supply( + track: "beta" + ) + end + desc "Deploy a new version to the Google Play" lane :deploy do gradle(task: "clean assembleRelease") diff --git a/android/fastlane/README.md b/android/fastlane/README.md index 8b79d0c63..26c3275de 100644 --- a/android/fastlane/README.md +++ b/android/fastlane/README.md @@ -31,6 +31,11 @@ Push internal test build to Fabric fastlane android beta ``` Submit a new Beta Build to Crashlytics Beta +### android release +``` +fastlane android release +``` +Submit a new release to Google Play Store ### android deploy ``` fastlane android deploy From 9a26b07651b34ff62dc5c42b0276bac5123ebb5e Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 10:33:27 -0500 Subject: [PATCH 22/27] Switch to internal release for testing --- android/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 041787bca..57ca6a385 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -75,7 +75,7 @@ platform :android do ) # changelog_from_git_commits supply( - track: "beta" + track: "internal" ) end From 96095a223bbcf649d4677d29c29a365589c255bc Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 11:06:23 -0500 Subject: [PATCH 23/27] Specify project path for android --- android/fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 57ca6a385..b20c76d68 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -67,8 +67,8 @@ platform :android do lane :release do tag = ENV['CIRCLE_TAG'] # looks like android_1.2.3_456 parts = tag.split("_") - increment_version_name(version_name: parts[1]) - increment_version_code(version_code: parts[2]) + increment_version_name(app_project_dir: "../app", version_name: parts[1]) + increment_version_code(app_project_dir: "../app", version_code: parts[2]) gradle( task: "clean assembleRelease", flags: "--init-script init.gradle" From 983e9fc859791ffc0c91d7677252aaf72eaf1301 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 11:29:34 -0500 Subject: [PATCH 24/27] Trying again --- android/fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index b20c76d68..cc5b571d4 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -67,8 +67,8 @@ platform :android do lane :release do tag = ENV['CIRCLE_TAG'] # looks like android_1.2.3_456 parts = tag.split("_") - increment_version_name(app_project_dir: "../app", version_name: parts[1]) - increment_version_code(app_project_dir: "../app", version_code: parts[2]) + increment_version_name(app_project_dir: "./app", version_name: parts[1]) + increment_version_code(app_project_dir: "./app", version_code: parts[2]) gradle( task: "clean assembleRelease", flags: "--init-script init.gradle" From e40108ec0971c67ebbaabf49418667deb711c21a Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 12:02:40 -0500 Subject: [PATCH 25/27] Android release to beta track --- android/fastlane/Fastfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index cc5b571d4..33bc6a5d2 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -73,9 +73,8 @@ platform :android do task: "clean assembleRelease", flags: "--init-script init.gradle" ) - # changelog_from_git_commits supply( - track: "internal" + track: "beta" ) end From 9daa9397981a0bcdedbdda6a37def78349ac9887 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 12:11:39 -0500 Subject: [PATCH 26/27] Archive sourcemap for adhoc and release builds --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0dffcacac..c639b80c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -203,6 +203,9 @@ jobs: command: bundle exec fastlane adhoc working_directory: android + - store_artifacts: + path: ./android/sourcemap.js + android-release: environment: LC_ALL: en_US.UTF-8 @@ -407,6 +410,9 @@ jobs: - store_artifacts: path: ./ios/TextilePhotos.ipa + - store_artifacts: + path: ./ios/sourcemap.js + ios-release: macos: xcode: "9.4.0" From 6bed94d3b40e0203352caac8aaa58a9b07ff8638 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Mon, 1 Oct 2018 15:38:54 -0500 Subject: [PATCH 27/27] Some generated fastlane doc --- ios/fastlane/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md index f815b4747..523f5e023 100644 --- a/ios/fastlane/README.md +++ b/ios/fastlane/README.md @@ -21,6 +21,11 @@ or alternatively using `brew cask install fastlane` fastlane ios test ``` Runs all the tests +### ios adhoc +``` +fastlane ios adhoc +``` +Push internal test build to Fabric ### ios beta ``` fastlane ios beta