Skip to content

Commit 25678d8

Browse files
author
Sevastyan Zhukov
authored
Merge pull request #4326 from mapbox/NAVSDK-772
Distribute versions with repeats
2 parents 5c545af + 4f7e699 commit 25678d8

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.circleci/config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,8 @@ jobs:
694694
- install-mbx-ci
695695
- run:
696696
name: Update version
697-
command: |
698-
pod repo update && pod trunk push MapboxCoreNavigation.podspec
699-
pod repo update && pod trunk push MapboxNavigation.podspec
697+
no_output_timeout: 20m
698+
command: python3 scripts/distribute-version.py
700699
- *save-cache-podmaster
701700
- *save-cache-gems
702701

scripts/distribute-version.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import subprocess
2+
import time
3+
4+
5+
def push_pod(name, max_attempts):
6+
for attempt in range(0, max_attempts):
7+
status = subprocess.run('pod repo update && pod trunk push ' + name + '.podspec', shell=True)
8+
if status.returncode == 0:
9+
return
10+
time.sleep(60 * pow(2, attempt))
11+
raise Exception('Maximum number of attempts have been made for ' + name)
12+
13+
14+
push_pod('MapboxCoreNavigation', 5)
15+
time.sleep(60)
16+
push_pod('MapboxNavigation', 5)

0 commit comments

Comments
 (0)