Skip to content

Commit

Permalink
CircleCI: add git credentials to snapshot generation (#3506)
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto authored Dec 11, 2023
1 parent 7515518 commit 465bed8
Showing 1 changed file with 44 additions and 45 deletions.
89 changes: 44 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,23 @@ commands:
command: |
bundle exec fastlane update_carthage_commit
create-snapshot-pr-if-needed:
parameters:
version:
type: string
job:
type: string
condition:
type: boolean
steps:
- when:
condition: << parameters.condition >>
steps:
- setup-git-credentials
- run:
name: Run << parameters.job >>
command: bundle exec fastlane << parameters.job >> version:"<< parameters.version >>"

jobs:
spm-release-build-xcode-14:
<<: *base-job
Expand Down Expand Up @@ -344,12 +361,10 @@ jobs:
no_output_timeout: 5m
environment:
SCAN_DEVICE: iPhone 13,OS=15.5
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_revenuecatui_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshots_repo_pr version:"revenuecatui-15"
job: "create_snapshots_repo_pr"
version: "revenuecatui-15"
- compress_result_bundle:
directory: fastlane/test_output
bundle_name: revenuecatui
Expand All @@ -374,12 +389,10 @@ jobs:
no_output_timeout: 5m
environment:
SCAN_DEVICE: iPhone 14,OS=16.4
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_revenuecatui_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshots_repo_pr version:"revenuecatui-16"
job: "create_snapshots_repo_pr"
version: "revenuecatui-16"
- compress_result_bundle:
directory: fastlane/test_output
bundle_name: revenuecatui
Expand Down Expand Up @@ -407,12 +420,10 @@ jobs:
no_output_timeout: 15m
environment:
SCAN_DEVICE: iPhone 15 Pro,OS=17.2
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_revenuecatui_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshots_repo_pr version:"revenuecatui-17"
job: "create_snapshots_repo_pr"
version: "revenuecatui-17"
- compress_result_bundle:
directory: fastlane/test_output
bundle_name: revenuecatui
Expand Down Expand Up @@ -459,12 +470,10 @@ jobs:
- compress_result_bundle:
directory: fastlane/test_output/xctest/ios
bundle_name: RevenueCat
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshot_pr version:"ios-17"
job: "create_snapshot_pr"
version: "ios-17"
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand All @@ -488,12 +497,10 @@ jobs:
- compress_result_bundle:
directory: fastlane/test_output/xctest/ios
bundle_name: RevenueCat
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshot_pr version:"ios-16"
job: "create_snapshot_pr"
version: "ios-16"
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand All @@ -515,12 +522,10 @@ jobs:
- compress_result_bundle:
directory: fastlane/test_output/xctest/ios
bundle_name: RevenueCat
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshot_pr version:"ios-15"
job: "create_snapshot_pr"
version: "ios-15"
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand Down Expand Up @@ -580,12 +585,10 @@ jobs:
- compress_result_bundle:
directory: fastlane/test_output/xctest/ios
bundle_name: RevenueCat
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshot_pr version:"ios-14"
job: "create_snapshot_pr"
version: "ios-14"
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand All @@ -609,12 +612,10 @@ jobs:
- compress_result_bundle:
directory: fastlane/test_output/xctest/ios
bundle_name: RevenueCat
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshot_pr version:"ios-13"
job: "create_snapshot_pr"
version: "ios-13"
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand All @@ -638,12 +639,10 @@ jobs:
- compress_result_bundle:
directory: fastlane/test_output/xctest/ios
bundle_name: RevenueCat
- when:
- create-snapshot-pr-if-needed:
condition: << pipeline.parameters.generate_snapshots >>
steps:
- run:
name: Run create_snapshot_pr
command: bundle exec fastlane create_snapshot_pr version:"ios-12"
job: "create_snapshot_pr"
version: "ios-12"
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand Down

0 comments on commit 465bed8

Please sign in to comment.