Skip to content

Commit

Permalink
Fix issues for nightly build (#34846)
Browse files Browse the repository at this point in the history
Summary:
There are two issues from nightly builds.

#### 1. `VERSION_NAME=1000.0.0-main` in  _ReactAndroid/gradle.properties_

the solution is to remove unused _ReactAndroid/gradle.properties_  git revert when publishing package.

#### 2. `pod install` error from downloading hermes, e.g. the url is unavailable. `https://github.com/facebook/react-native/releases/download/v0.0.0-20221002-2027-2319f75c8/hermes-runtime-darwin-debug-v0.0.0-20221002-2027-2319f75c8.tar.gz`

fix _hermes-engine.podspec_ to support nightly build and build hermes from main branch.

## Changelog

[General] [Fixed] - Fix nightly build issues

Pull Request resolved: #34846

Test Plan:
1. i cannot fully test publish-npm.js workflow and it stops at `npm publish`. i can just check at this moment, the _ReactAndroid/gradle.properties_ is right.
2. create a `npx react-native init` project and `yarn add react-native@nightly`. patch `node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` and try `pod install`

Reviewed By: cipolleschi

Differential Revision: D40021649

Pulled By: cortinico

fbshipit-source-id: c9e2701e524f4b16eab6f2c72b5cfa34883082c3
  • Loading branch information
Kudo authored and facebook-github-bot committed Oct 3, 2022
1 parent a88f805 commit 93c3eff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions scripts/publish-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const {
exitIfNotOnGit,
getCurrentCommit,
isTaggedLatest,
revertFiles,
saveFiles,
} = require('./scm-utils');
const fs = require('fs');
Expand Down Expand Up @@ -210,9 +209,6 @@ if (exec('./gradlew :ReactAndroid:hermes-engine:installArchives').code) {
exit(1);
}

// undo uncommenting javadoc setting
revertFiles(['ReactAndroid/gradle.properties'], tmpPublishingFolder);

echo('Generated artifacts for Maven');

let artifacts = [
Expand Down
2 changes: 1 addition & 1 deletion sdks/hermes-engine/hermes-engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git = "https://github.com/facebook/hermes.git"
if ENV.has_key?('HERMES_ENGINE_TARBALL_PATH')
Pod::UI.puts '[Hermes] Using pre-built Hermes binaries from local path.' if Object.const_defined?("Pod::UI")
source[:http] = "file://#{ENV['HERMES_ENGINE_TARBALL_PATH']}"
elsif version == '1000.0.0'
elsif version == '1000.0.0' || version.start_with?('0.0.0-')
Pod::UI.puts '[Hermes] Installing hermes-engine may take a while, building Hermes from source...'.yellow if Object.const_defined?("Pod::UI")
source[:git] = git
source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip
Expand Down

0 comments on commit 93c3eff

Please sign in to comment.