Compare commits

...
Author SHA1 Message Date
Distiller 60129ab7ac [0.71.0-rc.0] Bump version numbers 2022-11-04 15:25:07 +00:00
Lorenzo Sciandra 41a80f2ee2 [LOCAL] Bump git checkout cache key (fourth time) 2022-11-04 15:15:19 +00:00
Lorenzo Sciandra 94b1165a44 Revert "[0.71.0-rc.0] Bump version numbers"
This reverts commit 27c32b2d71.
2022-11-04 15:14:34 +00:00
Nicola Corti e4f23f4783 [LOCAL] Invoke closeAndReleaseSonatypeStagingRepository in the publish gradle invocation 2022-11-04 08:13:54 -07:00
Distiller 27c32b2d71 [0.71.0-rc.0] Bump version numbers 2022-11-04 14:31:20 +00:00
Lorenzo Sciandra 5c9f160764 [LOCAL] Bump git checkout cache key (third time) 2022-11-04 14:26:59 +00:00
Lorenzo Sciandra 4d0be144bf Revert "[0.71.0-rc.0] Bump version numbers"
This reverts commit ea9dd430a6.
2022-11-04 14:26:17 +00:00
Lorenzo Sciandra 32931b19b1 [LOCAL] better fix for param 2022-11-04 13:14:37 +00:00
Distiller ea9dd430a6 [0.71.0-rc.0] Bump version numbers 2022-11-04 12:33:34 +00:00
Lorenzo Sciandra c4a7e46976 Revert "[0.71.0-rc.0] Bump version numbers"
This reverts commit c9a3c5749b.
2022-11-04 12:28:15 +00:00
Lorenzo Sciandra b8f8ac0e1c [LOCAL] Bump git checkout cache key (again) 2022-11-04 12:27:23 +00:00
Lorenzo Sciandra 8e3b62019e [LOCAL] remove unneed/obsolete job 2022-11-04 12:25:44 +00:00
Lorenzo Sciandra 0f72abfc03 [LOCAL] fix publish npm post strict 2022-11-04 12:25:14 +00:00
Distiller c9a3c5749b [0.71.0-rc.0] Bump version numbers 2022-11-04 11:27:06 +00:00
Riccardo Cipolleschi fd5e282290 [LOCAL] Bump git checkout cache key 2022-11-04 11:18:06 +00:00
Riccardo Cipolleschi 39798cfa91 Revert "[0.71.0-rc.0] Bump version numbers"
This reverts commit f0054e1e30.
2022-11-04 10:53:57 +00:00
Lorenzo Sciandra 741d102476 [LOCAL] bump CLI to 10 alpha3 2022-11-04 10:45:48 +00:00
Lorenzo Sciandra 49278df494 fix (deps): add explicitly eslint config to dependencies (#35192)
Summary:
Basically since this change https://github.com/facebook/react-native/pull/34423 everything worked ok because in the main branch where the monorepo has the workspace section and everything, `react-native-community/eslint-config` was getting pulled in as a node_module anyway - but when moving to a stable branch and wanting to do a release, as we are now with 0.71, because of what the final package.json looks like for react-native and [the modifications that it goes through](https://github.com/facebook/react-native/commit/f0054e1e303e238d40970d23a3b3ae47502c32ea#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519) (ex. the `workspace` section disappears), the fact that it's not directly listed as dependency makes [the CI fails](https://app.circleci.com/pipelines/github/facebook/react-native/17124/workflows/54a4162d-f466-4eab-94ba-ec9fe77e2ecf/jobs/339643) with `Error: Failed to load config "react-native-community" to extend from.`

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - add explicitly eslint config to dependencies

Pull Request resolved: https://github.com/facebook/react-native/pull/35192

Test Plan: In 0.71, add the deps to see the error disappear (it gets replaced by a different one though, looking into that)

Reviewed By: jacdebug, cortinico

Differential Revision: D40988407

Pulled By: cipolleschi

fbshipit-source-id: 38f433a0b4b47a7cb61b59e887459d11182a5b4b
2022-11-04 10:35:55 +00:00
Nicola Corti e59cf2db64 Remove project.android block from rn-tester's CLI config (#35197)
Summary:
The project.android block is unnecessary and contains a wrong path. Let's use the default path which is `./android`.

## Changelog

[Internal] - Remove project.android block from rn-tester's CLI config

Pull Request resolved: https://github.com/facebook/react-native/pull/35197

Test Plan: Tested locally + will wait for a CI run

Reviewed By: robhogan

Differential Revision: D41013193

Pulled By: cortinico

fbshipit-source-id: 5c76c9b571b23ad71a23a8f3f05a9acb4d6e20b9
2022-11-04 10:24:34 +00:00
Dmitry Rykun ae677efb57 Bump dependency versions before the branch cut 0.71.0
Summary: Changelog: [General][Changed] - Bump dependency versions.

Reviewed By: cipolleschi

Differential Revision: D40991336

fbshipit-source-id: 71c8edbeb274d095403b2f17e60f217d16fe01c0
2022-11-04 08:16:36 +00:00
Riccardo Cipolleschi 41bf725ada [Fix] Make sure to export a single version for hermes artifacts and wipe Podfile.lock while in release 2022-11-03 22:39:05 +00:00
Riccardo Cipolleschi becb47ccb6 [Fix] Let React Native decide the Hermes version to use in the Codegen 2022-11-03 21:50:47 +00:00
Distiller f0054e1e30 [0.71.0-rc.0] Bump version numbers 2022-11-03 14:45:25 +00:00
Nicola Corti 936d69e7a1 Correctly set -DCMAKE_BUILD_TYPE for Hermes on iOS
Summary:
We accidentally added `-DCMAKE_BUILD_TYPE=Debug` for Hermes which is causing
a really slow engine execution. This fixes it and keep the -DCMAKE_BUILD_TYPE
aligned with the one used on Android.

Changelog:
[iOS] [Fixed] - Correctly set -DCMAKE_BUILD_TYPE for Hermes on iOS

Reviewed By: hramos, cipolleschi

Differential Revision: D40980934

fbshipit-source-id: 30f0455990a911b51eb109bebca8272507302650
2022-11-03 14:37:54 +00:00
Riccardo 151498a122 Merge pull request #35188 from dmytrorykun/export-D40979350
Revert: make RCTBlobManager TurboModule-compatible
2022-11-03 14:31:24 +00:00
Dmitry Rykun 94cea1edda feat: make RCTBlobManager TurboModule-compatible
Summary:
This diff reverts D40716048 (https://github.com/facebook/react-native/commit/279cfec55fdf404fdb9198edbb37d3adfdfb3bf1) (https://github.com/facebook/react-native/pull/35047) which breaks RCTImageLoader.
https://pxl.cl/2jKrM
Those files are auto-generated and are not supposed to be edited manually.
Changelog: [iOS] [Fixed] - https://github.com/facebook/react-native/pull/35047 reverted.

Reviewed By: cipolleschi

Differential Revision: D40979350

fbshipit-source-id: ece2b9c653fe01e209a523e6a99e41a0605fddac
2022-11-03 05:13:04 -07:00
Riccardo Cipolleschi 5f656e98c9 Hermes version bump for 0.71.0-RC0 2022-11-03 10:25:22 +00:00
30 changed files with 1077 additions and 776 deletions
+34 -58
View File
@@ -48,7 +48,7 @@ references:
# Anchors for the cache keys
cache_keys:
checkout_cache_key: &checkout_cache_key v1-checkout
checkout_cache_key: &checkout_cache_key v5-checkout
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
hermes_workspace_cache_key: &hermes_workspace_cache_key v4-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
@@ -306,11 +306,10 @@ commands:
exit 0
fi
TARBALL_FILENAME=$(node ~/react-native/scripts/hermes/get-tarball-name.js --buildType "<< parameters.flavor >>" --releaseVersion "*")
TARBALL_PATH=$(ls $HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME)
echo "Looking for $TARBALL_FILENAME in $HERMES_TARBALL_ARTIFACTS_DIR"
echo "$TARBALL_PATH"
#mimicking the logic of test_ios_template
TARBALL_FILENAME=$(ls -AU "$HERMES_TARBALL_ARTIFACTS_DIR" | head -1)
echo "Will use tarball: $TARBALL_FILENAME"
TARBALL_PATH="$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME"
if [ ! -f $TARBALL_PATH ]; then
echo "Hermes tarball not present ($TARBALL_PATH). Build Hermes from source."
@@ -601,7 +600,13 @@ jobs:
export USE_HERMES=0
fi
cd packages/rn-tester && bundle exec pod install --verbose
cd packages/rn-tester
echo "Hermes engine tarball: $HERMES_ENGINE_TARBALL_PATH"
if [[ "$HERMES_ENGINE_TARBALL_PATH" != *"1000.0.0"* ]]; then
# we are in a release. Let's wipe the Podfile.lock
rm -rf Podfile.lock
fi
bundle exec pod install --verbose
# -------------------------
# Runs iOS unit tests
@@ -944,7 +949,13 @@ jobs:
export USE_HERMES=0
fi
cd packages/rn-tester && bundle exec pod install
cd packages/rn-tester
echo "Hermes engine tarball: $HERMES_ENGINE_TARBALL_PATH"
if [[ "$HERMES_ENGINE_TARBALL_PATH" != *"1000.0.0"* ]]; then
# we are in a release. Let's wipe the Podfile.lock
rm -rf Podfile.lock
fi
bundle exec pod install --verbose
- run:
name: Build RNTester
@@ -1211,9 +1222,6 @@ jobs:
command: |
cd ./sdks/hermes || exit 1
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-mac-framework.sh
- with_hermesc_span:
flavor: << parameters.flavor >>
steps:
- run:
name: Build the Hermes iOS frameworks
command: |
@@ -1233,20 +1241,25 @@ jobs:
RELEASE_VERSION=$(get_release_version)
popd
# if RELEASE_VERSION is a stable and a previous artifact already exists, we want to rename it.
TARBALL_NAME_FOR_MAIN=$(node ./scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE" --releaseVersion "1000.0.0")
TARBALL_FILENAME=$(node ./scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE" --releaseVersion "$RELEASE_VERSION")
if [[ "$RELEASE_VERSION" != "1000.0.0" ]] && [[ -n "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_NAME_FOR_MAIN" ]]; then
mv "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_NAME_FOR_MAIN" "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME"
else
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
TARBALL_OUTPUT_PATH=$(node ./scripts/hermes/create-tarball.js \
--inputDir ./sdks/hermes \
--buildType "$BUILD_TYPE" \
--releaseVersion "$RELEASE_VERSION" \
--outputDir $TARBALL_OUTPUT_DIR)
TARBALL_OUTPUT_PATH=$(node ./scripts/hermes/create-tarball.js \
--inputDir ./sdks/hermes \
--buildType "$BUILD_TYPE" \
--releaseVersion "$RELEASE_VERSION" \
--outputDir $TARBALL_OUTPUT_DIR)
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
fi
- when:
condition:
equal: [ << parameters.flavor >>, "Debug"]
@@ -1495,43 +1508,6 @@ jobs:
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}"
# END: Stable releases
# START: Stables and commitlies
- when:
condition:
or:
- equal: [ "release", << parameters.release_type >> ]
- equal: [ "dry-run", << parameters.release_type >> ]
steps:
- run:
name: Install dependencies
command: apt update && apt install -y jq jo
- run:
name: Create draft GitHub Release and upload Hermes binaries
command: |
RELEASE_VERSION=$(cat build/.version)
if [[ << parameters.release_type >> == "release" ]]; then
GIT_TAG=$CIRCLE_TAG
elif [[ << parameters.release_type >> == "dry-run" ]]; then
GIT_TAG=v1000.0.0
fi
ARTIFACTS=("")
for build_type in "Debug" "Release"; do
TARBALL_FILENAME=$(node ./scripts/hermes/get-tarball-name.js \
--buildType $build_type \
--releaseVersion $RELEASE_VERSION)
ARTIFACTS+=("$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME")
done
./scripts/circleci/create_github_release.sh \
<< parameters.release_type >> \
$GIT_TAG \
$RELEASE_VERSION \
$GITHUB_TOKEN \
"${ARTIFACTS[@]}"
# END: Stable and commitlies
# -------------------------
# JOBS: Nightly
# -------------------------
+3 -3
View File
@@ -85,16 +85,16 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.0)
zeitwerk (2.6.4)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
cocoapods (~> 1.11, >= 1.11.3)
RUBY VERSION
ruby 2.7.5p203
ruby 2.7.6p219
BUNDLED WITH
2.3.22
+3 -3
View File
@@ -10,8 +10,8 @@
*/
exports.version = {
major: 1000,
minor: 0,
major: 0,
minor: 71,
patch: 0,
prerelease: null,
prerelease: 'rc.0',
};
+3 -3
View File
@@ -21,10 +21,10 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(1000),
RCTVersionMinor: @(0),
RCTVersionMajor: @(0),
RCTVersionMinor: @(71),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
RCTVersionPrerelease: @"rc.0",
};
});
return __rnVersion;
-1
View File
@@ -53,7 +53,6 @@ Class RCTWebSocketModuleCls(void) __attribute__((used));
Class RCTDevLoadingViewCls(void) __attribute__((used));
Class RCTDevSplitBundleLoaderCls(void) __attribute__((used));
Class RCTEventDispatcherCls(void) __attribute__((used));
Class RCTBlobManagerCls(void) __attribute__((used));
#ifdef __cplusplus
}
-1
View File
@@ -36,7 +36,6 @@ Class RCTCoreModulesClassProvider(const char *name) {
{"PerfMonitor", RCTPerfMonitorCls},
{"DevMenu", RCTDevMenuCls},
{"DevSettings", RCTDevSettingsCls},
{"BlobModule", RCTBlobManagerCls},
{"RedBox", RCTRedBoxCls},
{"LogBox", RCTLogBoxCls},
{"WebSocketExecutor", RCTWebSocketExecutorCls},
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0
VERSION_NAME=0.71.0-rc.0
GROUP=com.facebook.react
# JVM Versions
@@ -15,8 +15,8 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 1000,
"minor", 0,
"major", 0,
"minor", 71,
"patch", 0,
"prerelease", null);
"prerelease", "rc.0");
}
+3 -3
View File
@@ -15,10 +15,10 @@
namespace facebook::react {
constexpr struct {
int32_t Major = 1000;
int32_t Minor = 0;
int32_t Major = 0;
int32_t Minor = 71;
int32_t Patch = 0;
std::string_view Prerelease = "";
std::string_view Prerelease = "rc.0";
} ReactNativeVersion;
} // namespace facebook::react
+50 -13
View File
@@ -1,7 +1,6 @@
{
"name": "react-native",
"private": true,
"version": "1000.0.0",
"version": "0.71.0-rc.0",
"bin": "./cli.js",
"description": "A framework for building native apps using React",
"license": "MIT",
@@ -100,20 +99,16 @@
"test-ios": "./scripts/objc-test.sh test",
"test-typescript": "dtslint types"
},
"workspaces": [
"packages/*",
"repo-config"
],
"peerDependencies": {
"react": "18.2.0"
},
"dependencies": {
"@jest/create-cache-key-function": "^29.2.1",
"@react-native-community/cli": "10.0.0-alpha.2",
"@react-native-community/cli-platform-android": "10.0.0-alpha.2",
"@react-native-community/cli-platform-ios": "10.0.0-alpha.1",
"@react-native-community/cli": "10.0.0-alpha.3",
"@react-native-community/cli-platform-android": "10.0.0-alpha.3",
"@react-native-community/cli-platform-ios": "10.0.0-alpha.3",
"@react-native/assets": "1.0.0",
"@react-native/normalize-color": "2.0.0",
"@react-native/normalize-color": "2.1.0",
"@react-native/polyfills": "2.0.0",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
@@ -140,13 +135,55 @@
"stacktrace-parser": "^0.1.3",
"use-sync-external-store": "^1.0.0",
"whatwg-fetch": "^3.0.0",
"ws": "^6.2.2"
"ws": "^6.2.2",
"react-native-codegen": "^0.71.2"
},
"devDependencies": {
"flow-bin": "^0.191.0",
"hermes-eslint": "0.8.0",
"react": "18.2.0",
"react-test-renderer": "^18.2.0"
"react-test-renderer": "18.2.0",
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.18.2",
"@babel/generator": "^7.14.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@definitelytyped/dtslint": "^0.0.127",
"@react-native-community/eslint-config": "*",
"@react-native-community/eslint-plugin": "*",
"@react-native/eslint-plugin-specs": "^0.71.1",
"@reactions/component": "^2.0.2",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.30.5",
"async": "^3.2.2",
"clang-format": "^1.8.0",
"connect": "^3.6.5",
"coveralls": "^3.1.1",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jest": "^26.5.3",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-lint": "^1.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-relay": "^1.8.3",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.13.1",
"metro-babel-register": "0.73.3",
"metro-memory-fs": "0.73.3",
"mkdirp": "^0.5.1",
"prettier": "^2.4.1",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"typescript": "4.1.3",
"ws": "^6.2.2",
"yargs": "^17.5.1"
},
"codegenConfig": {
"libraries": [
@@ -166,4 +203,4 @@
}
]
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "0.71.0",
"version": "0.71.1",
"name": "@react-native/babel-plugin-codegen",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"repository": {
@@ -0,0 +1,23 @@
load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
yarn_workspace(
name = "yarn-workspace",
srcs = glob(
["**/*.js"],
exclude = [
"**/__fixtures__/**",
"**/__flowtests__/**",
"**/__mocks__/**",
"**/__server_snapshot_tests__/**",
"**/__tests__/**",
"**/node_modules/**",
"**/node_modules/.bin/**",
"**/.*",
"**/.*/**",
"**/.*/.*",
"**/*.xcodeproj/**",
"**/*.xcworkspace/**",
],
),
visibility = ["PUBLIC"],
)
@@ -1,6 +1,6 @@
{
"name": "@react-native-community/eslint-config",
"version": "3.1.0",
"version": "3.2.0",
"description": "ESLint config for React Native",
"main": "index.js",
"license": "MIT",
@@ -1,6 +1,6 @@
{
"name": "@react-native-community/eslint-plugin",
"version": "1.2.0",
"version": "1.3.0",
"description": "ESLint rules for @react-native-community/eslint-config",
"main": "index.js",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.71.0",
"version": "0.71.1",
"description": "ESLint rules to validate NativeModule and Component Specs",
"main": "index.js",
"repository": {
@@ -1,7 +1,7 @@
{
"name": "@react-native/hermes-inspector-msggen",
"private": true,
"version": "0.71.0",
"version": "0.71.1",
"license": "MIT",
"bin": {
"msggen": "./bin/index.js"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-color",
"version": "2.0.0",
"version": "2.1.0",
"description": "Color normalization for React Native.",
"repository": {
"type": "git",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-native-codegen",
"version": "0.71.1",
"version": "0.71.2",
"description": "⚛️ Code generation tools for React Native",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-codegen",
"repository": {
@@ -29,8 +29,5 @@ module.exports = {
ios: {
sourceDir: '.',
},
android: {
sourceDir: '.',
},
},
};
+3 -2
View File
@@ -14,8 +14,9 @@
"@babel/generator": "^7.14.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@definitelytyped/dtslint": "^0.0.127",
"@react-native-community/eslint-config": "*",
"@react-native-community/eslint-plugin": "*",
"@react-native/eslint-plugin-specs": "^0.71.0",
"@react-native/eslint-plugin-specs": "^0.71.1",
"@reactions/component": "^2.0.2",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.30.5",
@@ -46,7 +47,7 @@
"mkdirp": "^0.5.1",
"prettier": "^2.4.1",
"react": "18.2.0",
"react-native-codegen": "^0.71.1",
"react-native-codegen": "^0.71.2",
"react-test-renderer": "18.2.0",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
-123
View File
@@ -1,123 +0,0 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# This script creates a draft GitHub Release using RELEASE_TEMPLATE.md
# as a template and will upload the provided artifacts to the release.
# Install dependencies:
# apt update && apt install -y jq jo
THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
REACT_NATIVE_PATH="$THIS_DIR/../.."
GITHUB_OWNER=${CIRCLE_PROJECT_USERNAME:-facebook}
GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native}
RELEASE_TYPE="$1"; shift
GIT_TAG="$1"; shift
RELEASE_VERSION="$1"; shift
GITHUB_TOKEN="$1"; shift
ARTIFACTS=("$@")
describe_header () {
printf "\\n\\n>>>>> %s\\n\\n\\n" "$1"
}
describe () {
printf "\\n\\n%s\\n\\n" "$1"
}
echoerr () {
echo "$@" 1>&2
}
if [[ $RELEASE_TYPE == "release" ]]; then
describe_header "Preparing to create a GitHub release."
elif [[ $RELEASE_TYPE == "dry-run" ]]; then
describe_header "Preparing to create a GitHub release as a dry-run."
elif [[ $RELEASE_TYPE == "nightly" ]]; then
describe "GitHub Releases are not used with nightlies. Skipping."
exit 0
else
echoerr "Unrecognized release type: $RELEASE_TYPE"
exit 1
fi
# Derive short version string for use in the sample command used
# to create a new RN app in RELEASE_TEMPLATE.md
# 0.69.0-rc.4 -> 0690rc4
RN_SHORT_VERSION=${RELEASE_VERSION//[.-]/}
PRERELEASE=false
if [[ "$RELEASE_VERSION" == *"rc"* ]]; then
PRERELEASE=true
fi
RELEASE_TEMPLATE_PATH="$REACT_NATIVE_PATH/.github/RELEASE_TEMPLATE.md"
if [[ -f $RELEASE_TEMPLATE_PATH ]]; then
# Replace placeholders in template with actual RN version strings
RELEASE_BODY=$(sed -e "s/__VERSION__/$RELEASE_VERSION/g" -e "s/__SHORT_VERSION__/$RN_SHORT_VERSION/g" "$RELEASE_TEMPLATE_PATH")
else
describe "Could not load GitHub Release template. Falling back to placeholder text."
RELEASE_BODY="<!-- TODO: Fill this out using RELEASE_TEMPLATE.md -->"
fi
# Format and encode JSON payload
RELEASE_DATA=$(jo tag_name="$GIT_TAG" name="$RELEASE_VERSION" body="$RELEASE_BODY" draft=true prerelease="$PRERELEASE" generate_release_notes=false)
if [[ ! $RELEASE_DATA ]]; then
echoerr "Could not format release data."
exit 1
fi
# Create GitHub Release draft
describe_header "Creating GitHub release."
describe "Release payload: $RELEASE_DATA"
if [[ $RELEASE_TYPE == "release" ]]; then
CREATE_RELEASE_RESPONSE=$(curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-d "$RELEASE_DATA" \
"https://api.github.com/repos/$GITHUB_OWNER/$GITHUB_REPO/releases"
)
STATUS=$?
if [ $STATUS == 0 ]; then
describe "Created GitHub Release successfully."
RELEASE_ID=$(echo "$CREATE_RELEASE_RESPONSE" | jq '.id')
else
echoerr "Could not create GitHub release, request failed with $STATUS:\n\n$CREATE_RELEASE_RESPONSE"
exit 1
fi
elif [[ $RELEASE_TYPE == "dry-run" ]]; then
describe "Skipping creating GitHub release because dry-run."
fi
# Upload artifacts
describe_header "Uploading artifacts to GitHub release."
for ARTIFACT_PATH in "${ARTIFACTS[@]}"
do
:
# Upload Hermes artifacts to GitHub Release
ARTIFACT_NAME=$(basename "$ARTIFACT_PATH")
describe "Uploading $ARTIFACT_NAME..."
if [[ $RELEASE_TYPE == "release" ]]; then
if curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Length: $(wc -c "$ARTIFACT_PATH" | awk '{print $1}')" \
-H "Content-Type: application/gzip" \
-T "$ARTIFACT_PATH" \
--progress-bar \
"https://uploads.github.com/repos/$GITHUB_OWNER/$GITHUB_REPO/releases/$RELEASE_ID/assets?name=$ARTIFACT_NAME"; then
describe "Uploaded $ARTIFACT_NAME."
else
describe "Could not upload $ARTIFACT_NAME to GitHub release."
fi
elif [[ $RELEASE_TYPE == "dry-run" ]]; then
describe "Skipping $ARTIFACT_NAME upload because dry-run."
fi
done
@@ -465,7 +465,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
"RCTTypeSafety": ["99.98.97"],
"React-Core": ["99.98.97"],
"React-jsi": ["99.98.97"],
"hermes-engine": ["99.98.97"],
"hermes-engine": [],
"ReactCommon/turbomodule/core": ["99.98.97"]
}
}
+1 -1
View File
@@ -118,7 +118,7 @@ class CodegenUtils
if hermes_enabled
spec[:'dependencies'].merge!({
'hermes-engine': [version],
'hermes-engine': [], # let React Native decide which version of Hermes Engine to be used. Otherwise, this can create conflicts.
});
else
spec[:'dependencies'].merge!({
+5
View File
@@ -65,6 +65,11 @@ const argv = yargs
type: 'boolean',
default: false,
})
.option('r', {
alias: 'release', // useless but needed for CI
type: 'boolean',
default: false,
})
.strict().argv;
const nightlyBuild = argv.nightly;
const dryRunBuild = argv.dryRun;
+13 -6
View File
@@ -73,24 +73,31 @@ function generateAndroidArtifacts(releaseVersion, tmpPublishingFolder) {
function publishAndroidArtifactsToMaven(releaseVersion, isNightly) {
// -------- Publish every artifact to Maven Central
// The GPG key is base64 encoded on CircleCI
// The GPG key is base64 encoded on CircleCI and then decoded here
let buff = Buffer.from(env.ORG_GRADLE_PROJECT_SIGNING_KEY_ENCODED, 'base64');
env.ORG_GRADLE_PROJECT_SIGNING_KEY = buff.toString('ascii');
if (exec('./gradlew publishAllToSonatype -PisNightly=' + isNightly).code) {
echo('Failed to publish artifacts to Sonatype (Maven Central)');
exit(1);
}
// We want to gate ourselves against accidentally publishing a 1.x or a 1000.x on
// maven central which will break the semver for our artifacts.
if (!isNightly && releaseVersion.startsWith('0.')) {
// -------- For stable releases, we also need to close and release the staging repository.
if (exec('./gradlew closeAndReleaseSonatypeStagingRepository').code) {
if (
exec(
'./gradlew publishAllToSonatype closeAndReleaseSonatypeStagingRepository -PisNightly=' +
isNightly,
).code
) {
echo(
'Failed to close and release the staging repository on Sonatype (Maven Central)',
);
exit(1);
}
} else {
// -------- For nightly releases, we only need to publish the snapshot to Sonatype snapshot repo.
if (exec('./gradlew publishAllToSonatype -PisNightly=' + isNightly).code) {
echo('Failed to publish artifacts to Sonatype (Maven Central)');
exit(1);
}
}
echo('Published artifacts to Maven Central');
+1
View File
@@ -0,0 +1 @@
hermes-2022-11-03-RNv0.71.0-85613e1f9d1216f2cce7e54604be46057092939d
@@ -52,7 +52,7 @@ function build_host_hermesc {
# Utility function to configure an Apple framework
function configure_apple_framework {
local build_cli_tools enable_bitcode enable_debugger
local build_cli_tools enable_bitcode enable_debugger cmake_build_type
if [[ $1 == iphoneos || $1 == catalyst ]]; then
enable_bitcode="true"
@@ -69,6 +69,13 @@ function configure_apple_framework {
else
enable_debugger="false"
fi
if [[ $BUILD_TYPE == "Debug" ]]; then
# JS developers aren't VM developers.
# Therefore we're passing as build type Release, to provide a faster build.
cmake_build_type="Release"
else
cmake_build_type="MinSizeRel"
fi
pushd "$HERMES_PATH" > /dev/null || exit 1
cmake -S . -B "build_$1" \
@@ -88,7 +95,7 @@ function configure_apple_framework {
-DJSI_DIR="$JSI_PATH" \
-DHERMES_RELEASE_VERSION="for RN $(get_release_version)" \
-DCMAKE_INSTALL_PREFIX:PATH=../destroot \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
-DCMAKE_BUILD_TYPE="$cmake_build_type"
popd > /dev/null || exit 1
}
+10 -1
View File
@@ -19,6 +19,15 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
enable_debugger="true"
fi
cmake_build_type=""
if [[ $CONFIGURATION == "Debug" ]]; then
# JS developers aren't VM developers.
# Therefore we're passing as build type Release, to provide a faster build.
cmake_build_type="Release"
else
cmake_build_type="MinSizeRel"
fi
deployment_target=${IPHONEOS_DEPLOYMENT_TARGET}
if [ -z "$deployment_target" ]; then
deployment_target=${MACOSX_DEPLOYMENT_TARGET}
@@ -46,7 +55,7 @@ echo "Configure Apple framework"
-DIMPORT_HERMESC:PATH="${hermesc_path}" \
-DHERMES_RELEASE_VERSION="for RN $release_version" \
-DCMAKE_INSTALL_PREFIX:PATH="${PODS_ROOT}/hermes-engine/destroot" \
-DCMAKE_BUILD_TYPE="$CONFIGURATION"
-DCMAKE_BUILD_TYPE="$cmake_build_type"
echo "Build Apple framework"
+1 -1
View File
@@ -11,7 +11,7 @@
},
"dependencies": {
"react": "18.2.0",
"react-native": "1000.0.0"
"react-native": "0.71.0-rc.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
+903 -540
View File
File diff suppressed because it is too large Load Diff