Skip to content

Commit 0a0c866

Browse files
authored
Merge pull request #7804 from element-hq/stefan/sdkAsSubmodule
Make the `matrix-ios-sdk` a submodule and use it as a local pod inste…
2 parents f38a422 + de993c2 commit 0a0c866

File tree

10 files changed

+55
-120
lines changed

10 files changed

+55
-120
lines changed

.github/workflows/ci-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
# Concurrency group not needed as this workflow only runs on develop which we always want to test.
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: 'true'
2426

2527
# Common cache
2628
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
@@ -49,8 +51,6 @@ jobs:
4951
run: |
5052
bundle config path vendor/bundle
5153
bundle install --jobs 4 --retry 3
52-
- name: Use right MatrixSDK versions
53-
run: bundle exec fastlane point_dependencies_to_related_branches
5454
5555
# Main step
5656
- name: Build iOS simulator

.github/workflows/ci-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
cancel-in-progress: true
2626

2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
29+
with:
30+
submodules: 'true'
2931

3032
# Common cache
3133
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
@@ -54,8 +56,6 @@ jobs:
5456
run: |
5557
bundle config path vendor/bundle
5658
bundle install --jobs 4 --retry 3
57-
- name: Use right MatrixSDK versions
58-
run: bundle exec fastlane point_dependencies_to_related_branches
5959
6060
# Main step
6161
- name: Unit tests

.github/workflows/ci-ui-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
cancel-in-progress: true
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: 'true'
2426

2527
# Common cache
2628
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
@@ -49,8 +51,6 @@ jobs:
4951
run: |
5052
bundle config path vendor/bundle
5153
bundle install --jobs 4 --retry 3
52-
- name: Use right MatrixSDK versions
53-
run: bundle exec fastlane point_dependencies_to_related_branches
5454
5555
# Main step
5656
- name: UI tests

.github/workflows/release-alpha.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
cancel-in-progress: true
2626

2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
29+
with:
30+
submodules: 'true'
2931

3032
# Common cache
3133
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
@@ -57,8 +59,6 @@ jobs:
5759
run: |
5860
bundle config path vendor/bundle
5961
bundle install --jobs 4 --retry 3
60-
- name: Use right MatrixSDK versions
61-
run: bundle exec fastlane point_dependencies_to_related_branches
6262
6363
# Import alpha release private signing certificate
6464
- name: Import signing certificate

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "matrix-ios-sdk"]
2+
path = matrix-ios-sdk
3+
url = [email protected]:matrix-org/matrix-ios-sdk.git

Gemfile.lock

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GEM
1111
base64
1212
nkf
1313
rexml
14-
activesupport (7.1.3.2)
14+
activesupport (7.1.3.4)
1515
base64
1616
bigdecimal
1717
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -29,24 +29,24 @@ GEM
2929
artifactory (3.0.17)
3030
atomos (0.1.3)
3131
aws-eventstream (1.3.0)
32-
aws-partitions (1.899.0)
33-
aws-sdk-core (3.191.4)
32+
aws-partitions (1.941.0)
33+
aws-sdk-core (3.197.0)
3434
aws-eventstream (~> 1, >= 1.3.0)
3535
aws-partitions (~> 1, >= 1.651.0)
3636
aws-sigv4 (~> 1.8)
3737
jmespath (~> 1, >= 1.6.1)
38-
aws-sdk-kms (1.78.0)
39-
aws-sdk-core (~> 3, >= 3.191.0)
38+
aws-sdk-kms (1.83.0)
39+
aws-sdk-core (~> 3, >= 3.197.0)
4040
aws-sigv4 (~> 1.1)
41-
aws-sdk-s3 (1.146.0)
42-
aws-sdk-core (~> 3, >= 3.191.0)
41+
aws-sdk-s3 (1.152.0)
42+
aws-sdk-core (~> 3, >= 3.197.0)
4343
aws-sdk-kms (~> 1)
4444
aws-sigv4 (~> 1.8)
4545
aws-sigv4 (1.8.0)
4646
aws-eventstream (~> 1, >= 1.0.2)
4747
babosa (1.0.4)
4848
base64 (0.2.0)
49-
bigdecimal (3.1.7)
49+
bigdecimal (3.1.8)
5050
claide (1.1.0)
5151
clamp (1.3.2)
5252
cocoapods (1.14.3)
@@ -90,7 +90,7 @@ GEM
9090
colored2 (3.1.2)
9191
commander (4.6.0)
9292
highline (~> 2.0.0)
93-
concurrent-ruby (1.2.3)
93+
concurrent-ruby (1.3.3)
9494
connection_pool (2.4.1)
9595
declarative (0.0.20)
9696
digest-crc (0.6.5)
@@ -131,15 +131,15 @@ GEM
131131
faraday-retry (1.0.3)
132132
faraday_middleware (1.2.0)
133133
faraday (~> 1.0)
134-
fastimage (2.3.0)
135-
fastlane (2.219.0)
134+
fastimage (2.3.1)
135+
fastlane (2.220.0)
136136
CFPropertyList (>= 2.3, < 4.0.0)
137137
addressable (>= 2.8, < 3.0.0)
138138
artifactory (~> 3.0)
139139
aws-sdk-s3 (~> 1.0)
140140
babosa (>= 1.0.3, < 2.0.0)
141141
bundler (>= 1.12.0, < 3.0.0)
142-
colored
142+
colored (~> 1.2)
143143
commander (~> 4.6)
144144
dotenv (>= 2.1.1, < 3.0.0)
145145
emoji_regex (>= 0.1, < 4.0)
@@ -160,10 +160,10 @@ GEM
160160
mini_magick (>= 4.9.4, < 5.0.0)
161161
multipart-post (>= 2.0.0, < 3.0.0)
162162
naturally (~> 2.2)
163-
optparse (>= 0.1.1)
163+
optparse (>= 0.1.1, < 1.0.0)
164164
plist (>= 3.1.0, < 4.0.0)
165165
rubyzip (>= 2.0.0, < 3.0.0)
166-
security (= 0.1.3)
166+
security (= 0.1.5)
167167
simctl (~> 1.6.3)
168168
terminal-notifier (>= 2.0.0, < 3.0.0)
169169
terminal-table (~> 3)
@@ -172,14 +172,14 @@ GEM
172172
word_wrap (~> 1.0.0)
173173
xcodeproj (>= 1.13.0, < 2.0.0)
174174
xcpretty (~> 0.3.0)
175-
xcpretty-travis-formatter (>= 0.0.3)
175+
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
176176
fastlane-plugin-brew (0.1.1)
177-
fastlane-plugin-sentry (1.20.0)
177+
fastlane-plugin-sentry (1.23.0)
178178
os (~> 1.1, >= 1.1.4)
179179
fastlane-plugin-versioning (0.5.2)
180180
fastlane-plugin-xcodegen (1.1.0)
181181
fastlane-plugin-brew (~> 0.1.1)
182-
ffi (1.16.3)
182+
ffi (1.17.0)
183183
fourflusher (2.3.1)
184184
fuzzy_match (2.0.4)
185185
gh_inspector (1.1.3)
@@ -220,22 +220,22 @@ GEM
220220
os (>= 0.9, < 2.0)
221221
signet (>= 0.16, < 2.a)
222222
highline (2.0.3)
223-
http-cookie (1.0.5)
223+
http-cookie (1.0.6)
224224
domain_name (~> 0.5)
225225
httpclient (2.8.3)
226-
i18n (1.14.4)
226+
i18n (1.14.5)
227227
concurrent-ruby (~> 1.0)
228228
jmespath (1.6.2)
229-
json (2.7.1)
229+
json (2.7.2)
230230
jwt (2.8.1)
231231
base64
232232
mini_magick (4.12.0)
233233
mini_mime (1.1.5)
234-
mini_portile2 (2.8.5)
235-
minitest (5.22.3)
234+
mini_portile2 (2.8.7)
235+
minitest (5.23.1)
236236
molinillo (0.8.0)
237237
multi_json (1.15.0)
238-
multipart-post (2.4.0)
238+
multipart-post (2.4.1)
239239
mutex_m (0.2.0)
240240
nanaimo (0.3.0)
241241
nap (1.1.0)
@@ -245,23 +245,24 @@ GEM
245245
nokogiri (1.15.6)
246246
mini_portile2 (~> 2.8.2)
247247
racc (~> 1.4)
248-
optparse (0.4.0)
248+
optparse (0.5.0)
249249
os (1.1.4)
250250
plist (3.7.1)
251251
public_suffix (4.0.7)
252-
racc (1.7.3)
253-
rake (13.1.0)
252+
racc (1.8.0)
253+
rake (13.2.1)
254254
representable (3.2.0)
255255
declarative (< 0.1.0)
256256
trailblazer-option (>= 0.1.1, < 0.2.0)
257257
uber (< 0.2.0)
258258
retriable (3.1.2)
259-
rexml (3.2.6)
259+
rexml (3.2.9)
260+
strscan
260261
rouge (2.0.7)
261262
ruby-macho (2.5.1)
262263
ruby2_keywords (0.0.5)
263264
rubyzip (2.3.2)
264-
security (0.1.3)
265+
security (0.1.5)
265266
signet (0.19.0)
266267
addressable (~> 2.8)
267268
faraday (>= 0.17.5, < 3.a)
@@ -276,6 +277,7 @@ GEM
276277
clamp (~> 1.3)
277278
nokogiri (>= 1.14.3)
278279
xcodeproj (~> 1.21)
280+
strscan (3.1.0)
279281
terminal-notifier (2.0.0)
280282
terminal-table (3.0.2)
281283
unicode-display_width (>= 1.1.1, < 3)

Podfile

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,10 @@ inhibit_all_warnings!
99
# Use frameworks to allow usage of pods written in Swift
1010
use_frameworks!
1111

12-
# Different flavours of pods to MatrixSDK. Can be one of:
13-
# - a String indicating an official MatrixSDK released version number
14-
# - `:local` (to use Development Pods)
15-
# - `{ :branch => 'sdk branch name'}` to depend on specific branch of MatrixSDK repo
16-
# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI
17-
#
18-
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
19-
$matrixSDKVersion = '= 0.27.8'
20-
# $matrixSDKVersion = :local
21-
# $matrixSDKVersion = { :branch => 'develop'}
22-
# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } }
23-
24-
########################################
25-
26-
case $matrixSDKVersion
27-
when :local
28-
$matrixSDKVersionSpec = { :path => '../matrix-ios-sdk/MatrixSDK.podspec' }
29-
when Hash
30-
spec_mode, sdk_spec = $matrixSDKVersion.first # extract first and only key/value pair; key is spec_mode, value is sdk_spec
31-
32-
case spec_mode
33-
when :branch
34-
# :branch => sdk branch name
35-
sdk_spec = { :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => sdk_spec.to_s } unless sdk_spec.is_a?(Hash)
36-
when :specHash
37-
# :specHash => {sdk spec Hash}
38-
sdk_spec = sdk_spec
39-
end
40-
41-
$matrixSDKVersionSpec = sdk_spec
42-
when String # specific MatrixSDK released version
43-
$matrixSDKVersionSpec = $matrixSDKVersion
44-
end
45-
4612
# Method to import the MatrixSDK
4713
def import_MatrixSDK
48-
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
49-
pod 'MatrixSDK/JingleCallStack', $matrixSDKVersionSpec, :inhibit_warnings => false
14+
pod 'MatrixSDK', :path => 'matrix-ios-sdk/MatrixSDK.podspec', :inhibit_warnings => false
15+
pod 'MatrixSDK/JingleCallStack', :path => 'matrix-ios-sdk/MatrixSDK.podspec', :inhibit_warnings => false
5016
end
5117

5218
########################################

Podfile.lock

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ DEPENDENCIES:
101101
- KeychainAccess (~> 4.2.2)
102102
- KTCenterFlowLayout (~> 1.3.1)
103103
- libPhoneNumber-iOS (~> 0.9.13)
104-
- MatrixSDK (= 0.27.8)
105-
- MatrixSDK/JingleCallStack (= 0.27.8)
104+
- MatrixSDK (from `matrix-ios-sdk/MatrixSDK.podspec`)
105+
- MatrixSDK/JingleCallStack (from `matrix-ios-sdk/MatrixSDK.podspec`)
106106
- OLMKit
107107
- ReadMoreTextView (~> 3.0.1)
108108
- Reusable (~> 4.1)
@@ -142,7 +142,6 @@ SPEC REPOS:
142142
- libPhoneNumber-iOS
143143
- LoggerAPI
144144
- Logging
145-
- MatrixSDK
146145
- MatrixSDKCrypto
147146
- OLMKit
148147
- ReadMoreTextView
@@ -162,6 +161,10 @@ SPEC REPOS:
162161
- zxcvbn-ios
163162
- ZXingObjC
164163

164+
EXTERNAL SOURCES:
165+
MatrixSDK:
166+
:path: matrix-ios-sdk/MatrixSDK.podspec
167+
165168
SPEC CHECKSUMS:
166169
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
167170
BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24
@@ -204,6 +207,6 @@ SPEC CHECKSUMS:
204207
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
205208
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
206209

207-
PODFILE CHECKSUM: 3bbda8faf037705f421dad839d6f5b1aef399f99
210+
PODFILE CHECKSUM: b622ffadc1a0fe5442787bd9023ca3d110384814
208211

209212
COCOAPODS: 1.15.2

fastlane/Fastfile

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -103,27 +103,6 @@ platform :ios do
103103
end
104104

105105

106-
desc "Point MatrixSDK to the related branches if such ones exist"
107-
lane :point_dependencies_to_related_branches do
108-
current_branch = mx_git_branch
109-
UI.message("Current branch: #{current_branch}")
110-
if current_branch.start_with?("release/")
111-
point_dependencies_to_pending_releases
112-
else
113-
point_dependencies_to_same_feature
114-
end
115-
end
116-
117-
desc "Point MatrixSDK to release/*/release branch if it exists, master otherwise"
118-
lane :point_dependencies_to_pending_releases do
119-
edit_podfile(branch_pattern: "release/*/release", default_branch: "master")
120-
end
121-
122-
desc "Point MatrixSDK to the branch with the same name as the current branch if such one exist, develop otherwise"
123-
lane :point_dependencies_to_same_feature do
124-
edit_podfile(branch_pattern: mx_git_branch) unless mx_git_branch.to_s.empty?
125-
end
126-
127106
desc "Use an app variant. An app variant overwrite default project configuration or ressource files with custom values"
128107
lane :setup_app_variant do |options|
129108
appVariantScript = "../Variants/setup_app_variant.sh"
@@ -473,25 +452,6 @@ platform :ios do
473452
preprocessor_definitions
474453
end
475454

476-
desc "Edit the Podfile in order to point MatrixSDK to the appropriate branches."
477-
private_lane :edit_podfile do |options|
478-
require 'net/http'
479-
480-
branch_pattern = options[:branch_pattern]
481-
sdk_slug = "matrix-org/matrix-ios-sdk"
482-
483-
default_branch = options[:default_branch] || 'develop'
484-
sdk_branch = find_branch(sdk_slug, branch_pattern) || default_branch
485-
486-
sdk_spec = { git: 'https://github.com/matrix-org/matrix-ios-sdk.git', branch: sdk_branch }
487-
488-
UI.message "✏️ Modify Podfile to point `MatrixSDK/*` to \`#{sdk_branch}\` branch..."
489-
podfile_content = File.read('../Podfile') # current dir is 'fastlane/' hence the '../'
490-
podfile_content.gsub!(%r{^\$matrixSDKVersion\s*=\s*.*$}, "$matrixSDKVersion = { :specHash => #{sdk_spec} }")
491-
File.write('../Podfile', podfile_content)
492-
UI.command_output("Content of modified Podfile:\n" + podfile_content)
493-
end
494-
495455
desc "Upload dsym files to Sentry to symbolicate crashes"
496456
private_lane :upload_dsyms_to_sentry do
497457
UI.user_error!("'SENTRY_AUTH_TOKEN' environment variable should be set to use this lane") unless !ENV["SENTRY_AUTH_TOKEN"].to_s.empty?

matrix-ios-sdk

Submodule matrix-ios-sdk added at f03778f

0 commit comments

Comments
 (0)