diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6cac438d5c..e5fd92fe5a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -49,8 +49,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Main step - name: Build iOS simulator diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f78a5aba9c..03c1181dc4 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -54,8 +54,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Main step - name: Unit tests diff --git a/.github/workflows/ci-ui-tests.yml b/.github/workflows/ci-ui-tests.yml index b13272947f..7f3396c214 100644 --- a/.github/workflows/ci-ui-tests.yml +++ b/.github/workflows/ci-ui-tests.yml @@ -49,8 +49,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Main step - name: UI tests diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml index e610628b45..2d90ea3d79 100644 --- a/.github/workflows/release-alpha.yml +++ b/.github/workflows/release-alpha.yml @@ -57,8 +57,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Import alpha release private signing certificate - name: Import signing certificate diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..90f7f83cb4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "matrix-ios-sdk"] + path = matrix-ios-sdk + url = git@github.com:matrix-org/matrix-ios-sdk.git diff --git a/Podfile b/Podfile index 3fb43f4179..f6f26f61c8 100644 --- a/Podfile +++ b/Podfile @@ -9,44 +9,10 @@ inhibit_all_warnings! # Use frameworks to allow usage of pods written in Swift use_frameworks! -# Different flavours of pods to MatrixSDK. Can be one of: -# - a String indicating an official MatrixSDK released version number -# - `:local` (to use Development Pods) -# - `{ :branch => 'sdk branch name'}` to depend on specific branch of MatrixSDK repo -# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI -# -# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it -$matrixSDKVersion = '= 0.27.8' -# $matrixSDKVersion = :local -# $matrixSDKVersion = { :branch => 'develop'} -# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } } - -######################################## - -case $matrixSDKVersion -when :local -$matrixSDKVersionSpec = { :path => '../matrix-ios-sdk/MatrixSDK.podspec' } -when Hash -spec_mode, sdk_spec = $matrixSDKVersion.first # extract first and only key/value pair; key is spec_mode, value is sdk_spec - - case spec_mode - when :branch - # :branch => sdk branch name - sdk_spec = { :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => sdk_spec.to_s } unless sdk_spec.is_a?(Hash) - when :specHash - # :specHash => {sdk spec Hash} - sdk_spec = sdk_spec - end - -$matrixSDKVersionSpec = sdk_spec -when String # specific MatrixSDK released version -$matrixSDKVersionSpec = $matrixSDKVersion -end - # Method to import the MatrixSDK def import_MatrixSDK - pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false - pod 'MatrixSDK/JingleCallStack', $matrixSDKVersionSpec, :inhibit_warnings => false + pod 'MatrixSDK', :path => 'matrix-ios-sdk/MatrixSDK.podspec', :inhibit_warnings => false + pod 'MatrixSDK/JingleCallStack', :path => 'matrix-ios-sdk/MatrixSDK.podspec', :inhibit_warnings => false end ######################################## diff --git a/Podfile.lock b/Podfile.lock index b830adadb2..673d4ecc0d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -101,8 +101,8 @@ DEPENDENCIES: - KeychainAccess (~> 4.2.2) - KTCenterFlowLayout (~> 1.3.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.27.8) - - MatrixSDK/JingleCallStack (= 0.27.8) + - MatrixSDK (from `matrix-ios-sdk/MatrixSDK.podspec`) + - MatrixSDK/JingleCallStack (from `matrix-ios-sdk/MatrixSDK.podspec`) - OLMKit - ReadMoreTextView (~> 3.0.1) - Reusable (~> 4.1) @@ -142,7 +142,6 @@ SPEC REPOS: - libPhoneNumber-iOS - LoggerAPI - Logging - - MatrixSDK - MatrixSDKCrypto - OLMKit - ReadMoreTextView @@ -162,6 +161,10 @@ SPEC REPOS: - zxcvbn-ios - ZXingObjC +EXTERNAL SOURCES: + MatrixSDK: + :path: matrix-ios-sdk/MatrixSDK.podspec + SPEC CHECKSUMS: AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58 BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24 @@ -204,6 +207,6 @@ SPEC CHECKSUMS: zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 -PODFILE CHECKSUM: 3bbda8faf037705f421dad839d6f5b1aef399f99 +PODFILE CHECKSUM: b622ffadc1a0fe5442787bd9023ca3d110384814 COCOAPODS: 1.15.2 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 51e23fe9dc..a2a2dc1c65 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -103,27 +103,6 @@ platform :ios do end - desc "Point MatrixSDK to the related branches if such ones exist" - lane :point_dependencies_to_related_branches do - current_branch = mx_git_branch - UI.message("Current branch: #{current_branch}") - if current_branch.start_with?("release/") - point_dependencies_to_pending_releases - else - point_dependencies_to_same_feature - end - end - - desc "Point MatrixSDK to release/*/release branch if it exists, master otherwise" - lane :point_dependencies_to_pending_releases do - edit_podfile(branch_pattern: "release/*/release", default_branch: "master") - end - - desc "Point MatrixSDK to the branch with the same name as the current branch if such one exist, develop otherwise" - lane :point_dependencies_to_same_feature do - edit_podfile(branch_pattern: mx_git_branch) unless mx_git_branch.to_s.empty? - end - desc "Use an app variant. An app variant overwrite default project configuration or ressource files with custom values" lane :setup_app_variant do |options| appVariantScript = "../Variants/setup_app_variant.sh" @@ -473,25 +452,6 @@ platform :ios do preprocessor_definitions end - desc "Edit the Podfile in order to point MatrixSDK to the appropriate branches." - private_lane :edit_podfile do |options| - require 'net/http' - - branch_pattern = options[:branch_pattern] - sdk_slug = "matrix-org/matrix-ios-sdk" - - default_branch = options[:default_branch] || 'develop' - sdk_branch = find_branch(sdk_slug, branch_pattern) || default_branch - - sdk_spec = { git: 'https://github.com/matrix-org/matrix-ios-sdk.git', branch: sdk_branch } - - UI.message "✏️ Modify Podfile to point `MatrixSDK/*` to \`#{sdk_branch}\` branch..." - podfile_content = File.read('../Podfile') # current dir is 'fastlane/' hence the '../' - podfile_content.gsub!(%r{^\$matrixSDKVersion\s*=\s*.*$}, "$matrixSDKVersion = { :specHash => #{sdk_spec} }") - File.write('../Podfile', podfile_content) - UI.command_output("Content of modified Podfile:\n" + podfile_content) - end - desc "Upload dsym files to Sentry to symbolicate crashes" private_lane :upload_dsyms_to_sentry do UI.user_error!("'SENTRY_AUTH_TOKEN' environment variable should be set to use this lane") unless !ENV["SENTRY_AUTH_TOKEN"].to_s.empty? diff --git a/matrix-ios-sdk b/matrix-ios-sdk new file mode 160000 index 0000000000..f03778fddb --- /dev/null +++ b/matrix-ios-sdk @@ -0,0 +1 @@ +Subproject commit f03778fddbaf682173706649ee1412b0143f0449