Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Riccardo Cipolleschi e57b6d11fa Remove .ruby-version and update Gemfile to support multiple versions of Ruby (#36281)
Summary:
This Change remove the need to have a specific version of Ruby installed. We are now supporting a wider range of Ruby versions, starting from Ruby 2.6.10 (the ruby installed on MacOS by default).
We are still using a Gemfile to control the version of cocoapods that needs to be installed.

## Changelog

[IOS] [CHANGED] - Remove `.ruby-version` and update Gemfile to support a wider range of Ruby versions

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

Test Plan:
- Tested locally on RNTester and an app from template, switch across different versions of Ruby
- CircleCI is green on the commit

Reviewed By: cortinico

Differential Revision: D43567660

Pulled By: cipolleschi

fbshipit-source-id: e7edfe5806a898a83ba39cb58b1318ebde56a57c
2023-02-26 09:32:28 -08:00
David Angulo cb7f1b1f0b Read `.ruby-version` file in `Gemfile` (#35410)
Summary:
When updating the Ruby version, 2 files are always needed to be updated (`.ruby-version` and `Gemfile`). When not in sync it can lead to an error like `Your Ruby version is 2.7.6, but your Gemfile specified 2.7.5`.

This lessens the files that need to be updated when upgrading the Ruby version and makes it in sync always. It makes the `.ruby-version` the source of truth.

### Example 1:

<img width="481" alt="Screenshot 2022-11-20 at 13 56 08" src="https://user-images.githubusercontent.com/36528176/202888191-450ab6d0-32a4-4d37-ad82-0beb2b22fa82.png">

When upgrading from `0.70.0` to `0.71.0-rc.0`. 2 files needs to be updated when it could have been just 1.

Source: https://react-native-community.github.io/upgrade-helper/?from=0.70.0&to=0.71.0-rc.0

### Example 2:

21c8837c12 updates 4 files (`.ruby-version`, `Gemfile`, `template/Gemfile`, `template/_ruby-version`) when it could have been just 2.

### Other Sources:
* https://andycroll.com/ruby/read-ruby-version-in-your-gemfile/
* https://render.com/docs/ruby-version (Heroku alternative)
* https://stackoverflow.com/a/35823132/9375533

## Changelog

[General] [Changed] - Read `.ruby-version` file in `Gemfile`

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

Test Plan: Only `.ruby-version` and `template/_ruby-version` needs to be updated when upgrading Ruby version.

Reviewed By: christophpurrer, cipolleschi

Differential Revision: D41429147

Pulled By: rshest

fbshipit-source-id: 9e541a1d84aed5dca1e6f465c61bb0ba15574211
2022-11-21 05:59:19 -08:00
Vincenzo Vitale 0a3ca80af4 Build the React Native NPM package when git is not available (#34694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34694

TL;DR Relax the assumption of having git to build the RN NPM package.

We do have two CI Systems: CircleCI for OpenSource and Sandcastle for Internal. It's crucial that the two CIs are aligned.

We currently don't have a way to test the new app template on Sandcastle for Android & iOS.
This results in scenarios where internal Diffs gets landed and break the public CI externally.

This is preparation work to then be able to build the RN NPM package in Sandcastle (which will be done in a follow-up diff).

With this we also introduce the restoring of all the changed files after the publishing script is done.

## Changelog

[Internal] [Added] - Made it possible to create publishing NPM packages in Sandcastle.

Reviewed By: cortinico, cipolleschi

Differential Revision: D39467471

fbshipit-source-id: b0de88a768b8a2fb798dd684fa8f97f4d0acb751
2022-09-16 02:58:36 -07:00
Danilo Bürger 96c611b5e8 Added Gemfile.lock to git add files when calling update-ruby.sh (#33484)
Summary:
In https://github.com/facebook/react-native/blob/main/scripts/update-ruby.sh#L61

```bash
bundle lock
```

is called which creates a Gemfile.lock in the rn root. This file should be in the git add files list along with the other files that get updated by that script.

## Changelog

[Internal] [Fixed] - Added Gemfile.lock to git add files when calling update-ruby.sh

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

Test Plan: Call update-ruby.sh with or without this patch. Without this patch, the Gemfile.lock will not be staged, with this patch, the Gemfile.lock will be staged.

Reviewed By: GijsWeterings

Differential Revision: D35118250

Pulled By: cortinico

fbshipit-source-id: 80f2c7fad6fbc3f09697988dcc20f7ac94a21473
2022-03-25 08:01:41 -07:00
Danilo Bürger 1907bd31f0 Remove Gemfile.lock from template (#33469)
Summary:
For the same reason we don't keep a yarn.lock or Podfile.lock, we shouldn't be keeping a Gemfile.lock in the template. The user will generate this on his own pulling in the current dependencies with the constraints in Gemfile. No need to lock to a specific version.

cc barbieri (author of https://github.com/facebook/react-native/pull/32303)
cc ravirajn22 (for raising the issue)

## Changelog

[iOS] [Fixed] - Remove Gemfile.lock from template

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

Test Plan: no test plan

Reviewed By: javache

Differential Revision: D35074105

Pulled By: cortinico

fbshipit-source-id: 47d1b92329f1d55d4a0adbacbc7e5e45f9d957e0
2022-03-23 05:03:56 -07:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Gustavo Sverzut Barbieri 1e6add1a43 iOS Ruby Updates (#32456)
Summary:
Fix the `scripts/update-ruby.sh` so it always use the correct [bundle config](https://bundler.io/man/bundle-config.1.html#DESCRIPTION). In the current version it wasn't using the correct configuration inside the `template/` directory, resulting in incorrect platform for `template/Gemfile.lock`.

While at that, update the gems to their latest version:
- ethon 0.14.0 -> 0.15.0
- json 0.5.1 -> 0.6.0
- zeitwerk 2.4.2 -> 2.5.1
- bundler 2.2.28 -> 2.2.29

## Changelog

No changelog

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

Test Plan:
Run `bump-oss-version.js` and see `template/Gemfile.lock` lists `ruby` as the `PLATFORM` (no diff in that line).

## References
 - e18cf90d71 (r58230816)

Reviewed By: yungsters

Differential Revision: D31841524

Pulled By: charlesbdudley

fbshipit-source-id: 695c245fcb344c866afed45f747e04233e5c91e4
2021-10-21 15:58:18 -07:00
Gustavo Sverzut Barbieri 57aa70c06c Introduce Gemfile, ruby-version (#32303)
Summary:
Implement par of the discussion https://github.com/react-native-community/discussions-and-proposals/discussions/411, except the `.nvmrc` part, this includes:
 - Setting `.ruby-version` in the main project and also `template/`
 - Fixing the CocoaPods version with a project-level `Gemfile` and also `template/Gemfile`
 - Using all `pod` executions from `bundle exec pod`, using the determined version
 - Script to manage and update the ruby version

## Changelog

[iOS] [Added] - Gemfile with CocoaPods 1.11 and ruby-version (2.7.4)

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

Test Plan: Build for iOS and run all CircleCI tests to see if nothing changed

Reviewed By: RSNara

Differential Revision: D31344686

Pulled By: fkgozali

fbshipit-source-id: 25c63131ca9b16d3cf6341019548e0d63bdcaefe
2021-10-01 21:22:26 -07:00