Skip to content

Commit 70c115e

Browse files
committed
Update update_versions.py
1 parent deda237 commit 70c115e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/update_versions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,19 @@ def update_android_deps():
178178
def update_unity_version(unity_sdk_version):
179179
version_cmake_path = os.path.join(os.getcwd(), "cmake", "firebase_unity_version.cmake")
180180
replacement = ""
181+
podversion = get_ios_pod_version_from_cpp()
182+
print(podversion)
181183
with open(version_cmake_path, "r") as f:
182184
datafile = f.readlines()
183185
for line in datafile:
184186
if "FIREBASE_UNITY_SDK_VERSION" in line:
185187
newline = "set(FIREBASE_UNITY_SDK_VERSION \"" + unity_sdk_version + "\""
186188
replacement = replacement + newline + "\n"
187-
elif "FIREBASE_IOS_POD_VERSION" in line:
188-
podversion = get_ios_pod_version_from_cpp()
189+
elif podversion and "FIREBASE_IOS_POD_VERSION" in line:
189190
newline = "set(FIREBASE_IOS_POD_VERSION \"" + podversion + "\""
190191
replacement = replacement + newline + "\n"
191-
elif "FIREBASE_SPM_VERSION" in line:
192+
elif podversion and "FIREBASE_SPM_VERSION" in line:
192193
# Reuse the Cocoapod version number, as they are typically the same
193-
podversion = get_ios_pod_version_from_cpp()
194194
newline = "set(FIREBASE_SPM_VERSION \"" + podversion + "\""
195195
replacement = replacement + newline + "\n"
196196
elif "FIREBASE_UNITY_JAR_RESOLVER_VERSION" in line:

0 commit comments

Comments
 (0)