File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
packages/react-native/sdks/hermes-engine Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -292,18 +292,22 @@ def nightly_tarball_url(version)
292292 artifact_name = "hermes-ios-debug.tar.gz"
293293 xml_url = "https://central.sonatype.com/repository/maven-snapshots/com/facebook/react/#{ artifact_coordinate } /#{ version } -SNAPSHOT/maven-metadata.xml"
294294
295- response = Net ::HTTP . get_response ( URI ( xml_url ) )
296- if response . is_a? ( Net ::HTTPSuccess )
297- xml = REXML ::Document . new ( response . body )
298- timestamp = xml . elements [ 'metadata/versioning/snapshot/timestamp' ] . text
299- build_number = xml . elements [ 'metadata/versioning/snapshot/buildNumber' ] . text
300- full_version = "#{ version } -#{ timestamp } -#{ build_number } "
301- final_url = "https://central.sonatype.com/repository/maven-snapshots/com/facebook/react/#{ artifact_coordinate } /#{ version } -SNAPSHOT/#{ artifact_coordinate } -#{ full_version } -#{ artifact_name } "
302-
303- return final_url
304- else
295+ begin # [macOS add exception handling
296+ response = Net ::HTTP . get_response ( URI ( xml_url ) )
297+ if response . is_a? ( Net ::HTTPSuccess )
298+ xml = REXML ::Document . new ( response . body )
299+ timestamp = xml . elements [ 'metadata/versioning/snapshot/timestamp' ] . text
300+ build_number = xml . elements [ 'metadata/versioning/snapshot/buildNumber' ] . text
301+ full_version = "#{ version } -#{ timestamp } -#{ build_number } "
302+ final_url = "https://central.sonatype.com/repository/maven-snapshots/com/facebook/react/#{ artifact_coordinate } /#{ version } -SNAPSHOT/#{ artifact_coordinate } -#{ full_version } -#{ artifact_name } "
303+
304+ return final_url
305+ else
306+ return ""
307+ end
308+ rescue => e
305309 return ""
306- end
310+ end # macOS]
307311end
308312
309313def resolve_url_redirects ( url )
You can’t perform that action at this time.
0 commit comments