mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
27
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60129ab7ac | ||
|
|
41a80f2ee2 | ||
|
|
94b1165a44 | ||
|
|
e4f23f4783 | ||
|
|
27c32b2d71 | ||
|
|
5c9f160764 | ||
|
|
4d0be144bf | ||
|
|
32931b19b1 | ||
|
|
ea9dd430a6 | ||
|
|
c4a7e46976 | ||
|
|
b8f8ac0e1c | ||
|
|
8e3b62019e | ||
|
|
0f72abfc03 | ||
|
|
c9a3c5749b | ||
|
|
fd5e282290 | ||
|
|
39798cfa91 | ||
|
|
741d102476 | ||
|
|
49278df494 | ||
|
|
e59cf2db64 | ||
|
|
ae677efb57 | ||
|
|
41bf725ada | ||
|
|
becb47ccb6 | ||
|
|
f0054e1e30 | ||
|
|
936d69e7a1 | ||
|
|
151498a122 | ||
|
|
94cea1edda | ||
|
|
5f656e98c9 |
+34
-58
@@ -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
@@ -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
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
*/
|
||||
|
||||
exports.version = {
|
||||
major: 1000,
|
||||
minor: 0,
|
||||
major: 0,
|
||||
minor: 71,
|
||||
patch: 0,
|
||||
prerelease: null,
|
||||
prerelease: 'rc.0',
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ Class RCTCoreModulesClassProvider(const char *name) {
|
||||
{"PerfMonitor", RCTPerfMonitorCls},
|
||||
{"DevMenu", RCTDevMenuCls},
|
||||
{"DevSettings", RCTDevSettingsCls},
|
||||
{"BlobModule", RCTBlobManagerCls},
|
||||
{"RedBox", RCTRedBoxCls},
|
||||
{"LogBox", RCTLogBoxCls},
|
||||
{"WebSocketExecutor", RCTWebSocketExecutorCls},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0
|
||||
VERSION_NAME=0.71.0-rc.0
|
||||
GROUP=com.facebook.react
|
||||
|
||||
# JVM Versions
|
||||
|
||||
+3
-3
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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
@@ -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,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,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,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,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: '.',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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!({
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user