Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LOCAL] fix: use REACT_NATIVE_CI instead of CI envvar #35605

Merged
merged 8 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ executors:
macos:
xcode: *xcode_version
resource_class: macos.x86.medium.gen2
environment:
- REACT_NATIVE_CI: true

# -------------------------
# COMMANDS
Expand Down Expand Up @@ -266,7 +268,7 @@ commands:
echo "$VERSION" > /tmp/react-native-version
echo "React Native Version is $(cat /tmp/react-native-version)"
echo "Hermes commit is $(cat /tmp/hermes/hermesversion)"

with_hermes_tarball_cache_span:
parameters:
steps:
Expand Down Expand Up @@ -1127,6 +1129,7 @@ jobs:
environment:
- HERMES_WS_DIR: *hermes_workspace_root
- HERMES_VERSION_FILE: "sdks/.hermesversion"
- REACT_NATIVE_CI: true
steps:
- run:
name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions scripts/cocoapods/__tests__/jsengine-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def teardown
Pod::UI.reset()
podSpy_cleanUp()
ENV['USE_HERMES'] = '1'
ENV['CI'] = nil
ENV['REACT_NATIVE_CI'] = nil
File.reset()
end

Expand Down Expand Up @@ -133,7 +133,7 @@ def test_isBuildingHermesFromSource_whenTarballIsNilAndVersionIsNotNightly_retur
end

def test_isBuildingHermesFromSource_whenTarballIsNilAndInReleaseBranch_returnTrue
ENV['CI'] = 'true'
ENV['REACT_NATIVE_CI'] = 'true'
File.mocked_existing_files(['../../sdks/.hermesversion'])
assert_true(is_building_hermes_from_source("0.999.0", '../..'))
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/cocoapods/jsengine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def is_building_hermes_from_source(react_native_version, react_native_path)
isInMain = react_native_version.include?('1000.0.0')

hermestag_file = File.join(react_native_path, "sdks", ".hermesversion")
isInCI = ENV['CI'] === 'true'
isInCI = ENV['REACT_NATIVE_CI'] === 'true'

isReleaseBranch = File.exist?(hermestag_file) && isInCI

Expand Down
2 changes: 1 addition & 1 deletion scripts/hermes/prepare-hermes-for-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function main(isInCI) {
}
}

const isInCI = process.env.CI === 'true';
const isInCI = process.env.REACT_NATIVE_CI === 'true';

main(isInCI).then(() => {
process.exit(0);
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-e2e-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if (argv.target === 'RNTester') {
exec(
`cd packages/rn-tester && USE_HERMES=${
argv.hermes ? 1 : 0
} CI=${onReleaseBranch} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`,
} REACT_NATIVE_CI=${onReleaseBranch} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`,
);

// if everything succeeded so far, we can launch Metro and the app
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 @@ -17,7 +17,7 @@ version = package['version']

# sdks/.hermesversion
hermestag_file = File.join(react_native_path, "sdks", ".hermesversion")
isInCI = ENV['CI'] === 'true'
isInCI = ENV['REACT_NATIVE_CI'] === 'true'

source = {}
git = "https://github.com/facebook/hermes.git"
Expand Down