Skip to content

Commit

Permalink
Merge branch 'main' into feat/percentage-in-translates
Browse files Browse the repository at this point in the history
  • Loading branch information
intergalacticspacehighway committed Mar 30, 2024
2 parents b49a38d + 04bf8cf commit dca54c1
Show file tree
Hide file tree
Showing 846 changed files with 33,676 additions and 30,849 deletions.
14 changes: 11 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@ parameters:
default: false
type: boolean

release_latest:
run_nightly_workflow:
default: false
type: boolean

release_version:
default: "9999"
default: ""
type: string

run_nightly_workflow:
release_monorepo_packages_version:
default: ""
type: string

release_tag:
default: ""
type: string

release_dry_run:
default: false
type: boolean

Expand Down
4 changes: 2 additions & 2 deletions .circleci/configurations/executors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ executors:
xcode: *xcode_version
resource_class: macos.x86.medium.gen2
environment:
- BUILD_FROM_SOURCE: true
- RCT_BUILD_HERMES_FROM_SOURCE: true
reactnativeios-lts:
<<: *defaults
macos:
xcode: '14.3.1'
resource_class: macos.x86.medium.gen2
environment:
- BUILD_FROM_SOURCE: true
- RCT_BUILD_HERMES_FROM_SOURCE: true
66 changes: 51 additions & 15 deletions .circleci/configurations/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ jobs:
environment:
- HERMES_WS_DIR: *hermes_workspace_root
- HERMES_VERSION_FILE: "packages/react-native/sdks/.hermesversion"
- BUILD_FROM_SOURCE: true
- RCT_BUILD_HERMES_FROM_SOURCE: true
steps:
- run:
name: Install dependencies
Expand Down Expand Up @@ -813,13 +813,19 @@ jobs:
exit 0
fi
export RELEASE_VERSION=$(cat /tmp/react-native-version)
if [[ "$SLICE" == "macosx" ]]; then
echo "[HERMES] Building Hermes for MacOS"
export MAC_DEPLOYMENT_TARGET=10.13
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-mac-framework.sh
unset MAC_DEPLOYMENT_TARGET
else
echo "[HERMES] Building Hermes for iOS: $SLICE"
export IOS_DEPLOYMENT_TARGET=13.4
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-ios-framework.sh "$SLICE"
unset IOS_DEPLOYMENT_TARGET
fi
unset RELEASE_VERSION
echo "Moving from build_$SLICE to $FINAL_PATH"
mv build_"$SLICE" "$FINAL_PATH"
Expand Down Expand Up @@ -898,7 +904,11 @@ jobs:
command: |
cd ./packages/react-native/sdks/hermes || exit 1
echo "[HERMES] Creating the universal framework"
export IOS_DEPLOYMENT_TARGET=13.4
export RELEASE_VERSION=$(cat /tmp/react-native-version)
./utils/build-ios-framework.sh build_framework
unset RELEASE_VERSION
unset IOS_DEPLOYMENT_TARGET
- run:
name: Package the Hermes Apple frameworks
command: |
Expand Down Expand Up @@ -1076,14 +1086,20 @@ jobs:
# -------------------------
# JOBS: Releases
# -------------------------
prepare_package_for_release:

# Writes a new commit and tag(s), which will trigger the `publish_release`
# and `publish_bumped_packages` workflows.
prepare_release:
parameters:
version:
type: string
latest:
type: boolean
default: false
dryrun:
# TODO(T182538198): Required for 0.74.x, where workspace packages are out
# of sync with react-native. This will be removed for 0.75+.
monorepo_packages_version:
type: string
tag:
type: string
dry_run:
type: boolean
default: false
executor: reactnativeios
Expand All @@ -1096,16 +1112,36 @@ jobs:
- brew_install:
package: cmake
- run:
name: "Set new react-native version and commit changes"
name: Versioning workspace packages
command: |
VERSION=<< parameters.version >>
if [[ -z "$VERSION" ]]; then
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -1)
echo "Using the version from the package.json: $VERSION"
fi
node ./scripts/releases-ci/prepare-package-for-release.js -v "$VERSION" -l << parameters.latest >> --dry-run << parameters.dryrun >>
node scripts/releases/set-version "<< parameters.monorepo_packages_version >>" --skip-react-native-version
- run:
name: Versioning react-native package
command: |
node scripts/releases/set-rn-version.js -v "<< parameters.version >>" --build-type "release"
- run:
name: Creating release commit
command: |
git commit -a -m "Release << parameters.version >>" -m "#publish-packages-to-npm&<< parameters.tag >>"
git tag -a "v<< parameters.version >>" -m "v<< parameters.version >>"
GIT_PAGER=cat git show HEAD
- when:
condition:
equal: ["latest", << parameters.tag >>]
steps:
- run:
name: Updating "latest" tag
command: |
git tag -d "latest"
git push origin :latest
git tag -a "latest" -m "latest"
- unless:
condition: << parameters.dry_run >>
steps:
run:
name: Pushing release commit
command: |
git push origin $CIRCLE_BRANCH --follow-tags
build_npm_package:
parameters:
Expand Down
11 changes: 6 additions & 5 deletions .circleci/configurations/test_workflows/testAll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_release:
name: "prepare_release (dry run test)"
version: "0.0.0"
monorepo_packages_version: "0.0.0"
tag: test
dry_run: true
- prepare_hermes_workspace
- build_android:
release_type: "dry-run"
Expand Down
11 changes: 6 additions & 5 deletions .circleci/configurations/test_workflows/testAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_release:
name: "prepare_release (dry run test)"
version: "0.0.0"
monorepo_packages_version: "0.0.0"
tag: test
dry_run: true
- prepare_hermes_workspace
- build_android:
release_type: "dry-run"
Expand Down
11 changes: 6 additions & 5 deletions .circleci/configurations/test_workflows/testIOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_release:
name: "prepare_release (dry run test)"
version: "0.0.0"
monorepo_packages_version: "0.0.0"
tag: test
dry_run: true
- prepare_hermes_workspace
- build_android:
release_type: "dry-run"
Expand Down
20 changes: 14 additions & 6 deletions .circleci/configurations/top_level.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ references:
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-windows-{{ checksum "/Users/circleci/project/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
# Hermes iOS
hermesc_apple_cache_key: &hermesc_apple_cache_key v3-hermesc-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_apple_slices_cache_key: &hermes_apple_slices_cache_key v4-hermes-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
hermes_apple_slices_cache_key: &hermes_apple_slices_cache_key v7-hermes-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
hermes_tarball_debug_cache_key: &hermes_tarball_debug_cache_key v5-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
hermes_tarball_release_cache_key: &hermes_tarball_release_cache_key v4-hermes-tarball-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
hermes_macosx_bin_release_cache_key: &hermes_macosx_bin_release_cache_key v2-hermes-release-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_macosx_bin_release_cache_key: &hermes_macosx_bin_release_cache_key v4-hermes-release-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_macosx_bin_debug_cache_key: &hermes_macosx_bin_debug_cache_key v2-hermes-debug-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_dsym_debug_cache_key: &hermes_dsym_debug_cache_key v2-hermes-debug-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_dsym_release_cache_key: &hermes_dsym_release_cache_key v2-hermes-release-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
# Cocoapods - RNTester
pods_cache_key: &pods_cache_key v11-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
cocoapods_cache_key: &cocoapods_cache_key v11-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v9-podfilelock-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v10-podfilelock-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}

# Cocoapods - Template
template_cocoapods_cache_key: &template_cocoapods_cache_key v6-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile.lock" }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "packages/rn-tester/Podfile.lock" }}
Expand Down Expand Up @@ -129,14 +129,22 @@ parameters:
default: false
type: boolean

release_latest:
run_nightly_workflow:
default: false
type: boolean

release_version:
default: "9999"
default: ""
type: string

run_nightly_workflow:
release_monorepo_packages_version:
default: ""
type: string

release_tag:
default: ""
type: string

release_dry_run:
default: false
type: boolean
14 changes: 8 additions & 6 deletions .circleci/configurations/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
workflows:
version: 2

# This workflow should only be triggered by release script
package_release:
# Release workflow, triggered by `yarn trigger-react-native-release`
create_release:
when: << pipeline.parameters.run_release_workflow >>
jobs:
# This job will push a tag that will trigger the publish_release workflow
- prepare_package_for_release:
name: prepare_package_for_release
- prepare_release:
name: prepare_release
version: << pipeline.parameters.release_version >>
latest : << pipeline.parameters.release_latest >>
monorepo_packages_version: << pipeline.parameters.release_monorepo_packages_version >>
tag: << pipeline.parameters.release_tag >>
dry_run: << pipeline.parameters.release_dry_run >>

# This job will run only when a tag is published due to all the jobs being filtered.
publish_release:
Expand Down Expand Up @@ -116,6 +117,7 @@ workflows:
parameters:
flavor: ["Debug", "Release"]
- build_npm_package:
name: build_nightly_npm_package
release_type: "nightly"
requires:
- build_android
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ module.exports = {
files: ['**/*.d.ts'],
plugins: ['redundant-undefined'],
rules: {
'no-dupe-class-members': 'off',
'redundant-undefined/redundant-undefined': [
'error',
{followExactOptionalPropertyTypes: true},
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ untyped-import
untyped-type-import

[version]
^0.229.0
^0.232.0
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: ⬆️ Upgrade - Build Regression
url: https://github.com/reactwg/react-native-releases/issues/new/choose
about: |
If you are upgrading to a new React Native version (stable or pre-release) and encounter a build regression.
- name: 🚀 Expo Issue
url: https://github.com/expo/expo/issues/new
about: |
Expand Down
Loading

0 comments on commit dca54c1

Please sign in to comment.