Skip to content

Commit 43091a0

Browse files
committed
Merge branch 'release/3.2.0' into wppinar/refresh-profile-on-upload
2 parents 343d1b0 + 26a9066 commit 43091a0

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ steps:
4848
permit_on_passed: true
4949
agents:
5050
queue: linter
51+
52+
- label: ":swift: Package.resolved"
53+
plugins: [$CI_TOOLKIT]
54+
notify:
55+
- github_commit_status:
56+
context: "Package.resolved"
57+
command: |
58+
install_gems
59+
bundle exec make validate-package-resolved
5160
5261
#################
5362
# Build and Test

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ ifndef BUILD_NUMBER
5959
override BUILD_NUMBER = 0
6060
endif
6161

62+
validate-package-resolved: bundle-install
63+
@bundle exec fastlane validate_package_resolved scheme:$(SCHEME_DEMO)
64+
6265
bundle-install:
6366
bundle install
6467

fastlane/Fastfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ platform :ios do
8080
)
8181
end
8282

83+
desc 'Checks whether all Package.resolved files are current'
84+
lane :validate_package_resolved do |scheme:|
85+
resolve_package_dependencies_for_project(project: XCODEPROJ_PATH, scheme: scheme)
86+
resolve_package_dependencies_for_spm
87+
88+
if uncommitted_changes.empty?
89+
UI.success('No uncommitted changes found.')
90+
else
91+
UI.user_error!("Uncommitted changes detected: \n #{uncommitted_changes}")
92+
end
93+
end
94+
8395
desc 'Builds the demo app from the given scheme for distribution'
8496
lane :build_demo_for_distribution do |scheme:, build_number:|
8597
UI.user_error! 'Please pass a build number by calling the lane with build_number:VALUE' if build_number.nil? || build_number.empty?
@@ -219,3 +231,21 @@ def read_from_xcconfig!(key:, xcconfig:)
219231

220232
configs[key]
221233
end
234+
235+
def resolve_package_dependencies_for_project(project:, scheme:)
236+
xcodebuild(
237+
project: project,
238+
scheme: scheme,
239+
configuration: 'Debug',
240+
clean: true,
241+
xcargs: '-resolvePackageDependencies -skipPackageUpdates'
242+
)
243+
end
244+
245+
def resolve_package_dependencies_for_spm
246+
spm(command: 'resolve')
247+
end
248+
249+
def uncommitted_changes
250+
sh('git status --porcelain').strip
251+
end

0 commit comments

Comments
 (0)