Skip to content

Commit e9b5849

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Use artifacts published from the Hermes repository on iOS (#53653)
Summary: Changelog: [IOS][CHANGED] - Changed the coordinates of hermes artifacts to those published from the Hermes repository regardless of which version is used Differential Revision: D81770379
1 parent 07c68cc commit e9b5849

3 files changed

Lines changed: 10 additions & 25 deletions

File tree

packages/react-native/sdks/hermes-engine/hermes-engine.podspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ end
2020

2121
# package.json
2222
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
23-
# TODO: T231755000 use the Hermes V1 version instead of React Native version
23+
# TODO: T231755000 use the Hermes version instead of React Native version
2424
version = package['version']
2525

2626
source_type = hermes_source_type(version, react_native_path)
@@ -64,9 +64,8 @@ Pod::Spec.new do |spec|
6464
end
6565

6666
# When using the local prebuilt tarball, it should include hermesc compatible with the used VM.
67-
# In other cases, when using Hermes V1, the prebuilt versioned binaries can be used.
68-
# TODO: T236142916 hermesc should be consumed from NPM even when not using Hermes V1
69-
if source_type != HermesEngineSourceType::LOCAL_PREBUILT_TARBALL && ENV['RCT_HERMES_V1_ENABLED'] == "1"
67+
# In other cases, the prebuilt versioned binaries can be used.
68+
if source_type != HermesEngineSourceType::LOCAL_PREBUILT_TARBALL
7069
hermes_compiler_path = File.dirname(Pod::Executable.execute_command('node', ['-p',
7170
'require.resolve(
7271
"hermes-compiler",

packages/react-native/sdks/hermes-engine/hermes-utils.rb

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,11 @@ def release_tarball_url(version, build_type)
224224
ENV['ENTERPRISE_REPOSITORY'] != nil && ENV['ENTERPRISE_REPOSITORY'] != "" ?
225225
ENV['ENTERPRISE_REPOSITORY'] :
226226
"https://repo1.maven.org/maven2"
227+
namespace = "com/facebook/hermes"
227228

228-
if hermes_v1_enabled()
229-
namespace = "com/facebook/hermes"
230-
# Sample url from Maven:
231-
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-debug.tar.gz
232-
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-#{build_type.to_s}.tar.gz"
233-
else
234-
namespace = "com/facebook/react"
235-
# Sample url from Maven:
236-
# https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.71.0/react-native-artifacts-0.71.0-hermes-ios-debug.tar.gz
237-
return "#{maven_repo_url}/#{namespace}/react-native-artifacts/#{version}/react-native-artifacts-#{version}-hermes-ios-#{build_type.to_s}.tar.gz"
238-
end
229+
# Sample url from Maven:
230+
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-debug.tar.gz
231+
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-#{build_type.to_s}.tar.gz"
239232
end
240233

241234
def download_stable_hermes(react_native_path, version, configuration)
@@ -257,16 +250,9 @@ def download_hermes_tarball(react_native_path, tarball_url, version, configurati
257250
end
258251

259252
def nightly_tarball_url(version)
260-
# TODO: T231755027 update coordinates and versioning
261-
artifact_coordinate = "react-native-artifacts"
253+
artifact_coordinate = "hermes-ios"
262254
artifact_name = "hermes-ios-debug.tar.gz"
263-
namespace = "com/facebook/react"
264-
265-
if hermes_v1_enabled()
266-
artifact_coordinate = "hermes-ios"
267-
artifact_name = "hermes-ios-debug.tar.gz"
268-
namespace = "com/facebook/hermes"
269-
end
255+
namespace = "com/facebook/hermes"
270256

271257
xml_url = "https://central.sonatype.com/repository/maven-snapshots/#{namespace}/#{artifact_coordinate}/#{version}-SNAPSHOT/maven-metadata.xml"
272258

scripts/releases/set-rn-artifacts-version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function updateTestFiles(
155155
async function updateGradleFile(version /*: string */) /*: Promise<void> */ {
156156
const contents = await fs.readFile(GRADLE_FILE_PATH, 'utf-8');
157157

158-
// TODO: T231755027 set HERMES_VERSION_NAME
158+
// TODO: T231755027 set HERMES_VERSION_NAME and HERMES_V1_VERSION_NAME
159159

160160
return fs.writeFile(
161161
GRADLE_FILE_PATH,

0 commit comments

Comments
 (0)