Skip to content

Commit 39a2a36

Browse files
authored
chore: Add steps to do unstable release in main (#2477)
1 parent 7ff6295 commit 39a2a36

File tree

2 files changed

+17
-25
lines changed

2 files changed

+17
-25
lines changed

.circleci/config.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ orbs:
9999
defaults: &defaults
100100
macos:
101101
xcode: '14.0.0'
102-
working_directory: ~/amplify-ios
102+
working_directory: ~/amplify-swift
103103
environment:
104104
BUNDLE_PATH: vendor/bundle
105105

@@ -119,7 +119,7 @@ commands:
119119
steps:
120120
- restore_cache:
121121
keys:
122-
- v2-gems-{{ checksum "~/amplify-ios/Gemfile.lock" }}
122+
- v2-gems-{{ checksum "~/amplify-swift/Gemfile.lock" }}
123123
- v2-gems-
124124

125125
check_bundle:
@@ -148,7 +148,7 @@ jobs:
148148
- save_cache:
149149
key: *repo_cache_key
150150
paths:
151-
- ~/amplify-ios
151+
- ~/amplify-swift
152152

153153
install_gems:
154154
<<: *defaults
@@ -162,7 +162,7 @@ jobs:
162162
BUNDLE_JOBS: 4
163163
BUNDLE_RETRY: 3
164164
- save_cache:
165-
key: v2-gems-{{ checksum "~/amplify-ios/Gemfile.lock" }}
165+
key: v2-gems-{{ checksum "~/amplify-swift/Gemfile.lock" }}
166166
paths:
167167
- vendor/bundle
168168

@@ -207,7 +207,7 @@ jobs:
207207
command: xcodebuild test -scheme <<parameters.scheme>> -sdk << parameters.sdk >> -destination "<<parameters.destination>>" | tee "artifacts/test-<< parameters.scheme >>-<< parameters.sdk >>.log" | xcpretty --simple --color --report junit
208208
- run:
209209
name: Upload << parameters.scheme >> coverage report to Codecov
210-
command: bash ~/amplify-ios/build-support/codecov.sh -F << parameters.scheme >>_unit_test -J '^<< parameters.scheme >>$'
210+
command: bash ~/amplify-swift/build-support/codecov.sh -F << parameters.scheme >>_unit_test -J '^<< parameters.scheme >>$'
211211
- store_test_results:
212212
path: build/reports
213213
- upload_artifacts
@@ -220,15 +220,15 @@ jobs:
220220
- check_bundle
221221
- run:
222222
name: Jazzy API doc generation
223-
command: bash ~/amplify-ios/CircleciScripts/jazzy_doc_gen.sh
223+
command: bash ~/amplify-swift/CircleciScripts/jazzy_doc_gen.sh
224224

225225
deploy:
226226
<<: *defaults
227227
parameters:
228228
lane:
229229
type: string
230230
default: 'unstable'
231-
description: deploy pods to trunk
231+
description: deploy new release
232232
steps:
233233
- add_ssh_keys:
234234
fingerprints:
@@ -237,13 +237,14 @@ jobs:
237237
- restore_gems
238238
- check_bundle
239239
- run:
240-
name: Release pods
240+
name: Release Amplify for Swift
241241
command: bundle exec fastlane << parameters.lane >>
242242
no_output_timeout: 60m
243243

244244
deploy_requires: &deploy_requires
245245
requires:
246-
- build_amplify_spm
246+
- build_amplify_ios_spm
247+
- build_amplify_macos_spm
247248
- ios_unit_test_amplify
248249
- ios_unit_test_awspluginscore
249250
- ios_unit_test_analytics
@@ -389,7 +390,13 @@ workflows:
389390
destination: << pipeline.parameters.macos-destination >>
390391
requires:
391392
- build_amplify_macos_spm
392-
393+
- deploy:
394+
name: deploy unstable
395+
<<: *deploy_requires
396+
filters:
397+
branches:
398+
only:
399+
- main
393400

394401
# Scheduled smoke test workflow
395402
# Jobs are pulled from the getting-started-smoke-test inline orb defined below

fastlane/Fastfile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
opt_out_usage
22
default_platform(:ios)
33

4-
PLIST_KEY = "CFBundleShortVersionString"
5-
64
platform :ios do
75
before_all do
86
# Perform a fetch before inferring the next version
@@ -78,7 +76,6 @@ platform :ios do
7876
version = options[:version].to_s
7977
changelog = options[:changelog]
8078
tag = "v#{version}"
81-
plugin_root = File.expand_path("#{ENV['CIRCLE_WORKING_DIRECTORY']}/AmplifyPlugins")
8279

8380
sh('bundle', 'exec', 'swift', 'package', 'update')
8481

@@ -95,15 +92,3 @@ platform :ios do
9592
sh('git', 'push', 'origin', 'release:main')
9693
end
9794
end
98-
99-
def with_retry(retries=5, wait=60)
100-
begin
101-
yield
102-
rescue StandardError => e
103-
retries -= 1
104-
raise e if retries.zero?
105-
UI.error("Error occurred: #{e}; retrying...")
106-
sleep(wait)
107-
retry
108-
end
109-
end

0 commit comments

Comments
 (0)