12 Commits

Author SHA1 Message Date
Distiller da420c99ac [0.67.2] Bump version numbers 2022-01-31 17:17:27 +00:00
Distiller 25f3d310d9 [0.67.1] Bump version numbers 2022-01-20 19:06:30 +00:00
Distiller 857dbd9b20 [0.67.0] Bump version numbers 2022-01-18 22:12:57 +00:00
Luna Wei e7296d6b34 Remove usages of bump-oss-version from generated scripts
Summary: Changelog: [Internal] - Update the source of the changes in generated files, no longer bump-oss-version but set-rn-version

Reviewed By: sota000

Differential Revision: D33110408

fbshipit-source-id: 8cd5004f5d40dde82fe4d6271d5b8598cd27ca31
2022-01-18 12:30:03 -08:00
Distiller c3aa86bea2 [0.67.0-rc.6] Bump version numbers 2021-12-14 19:32:53 +00:00
Distiller 73afb97e89 [0.67.0-rc.5] Bump version numbers 2021-12-06 23:36:14 +00:00
Luna Wei cd8fa9d3e8 [0.67.0-rc.4] Bump version numbers 2021-11-30 12:39:30 -08:00
Luna Wei 209bb94b9f [0.67.0-rc.3] Bump version numbers 2021-11-10 10:12:43 -08:00
Luna Wei a7d3ffee55 [0.67.0-rc.2] Bump version numbers 2021-10-25 14:00:47 -07:00
Luna Wei f6895e9b53 [0.67.0-rc.1] Bump version numbers 2021-10-22 14:30:08 -07:00
Luna Wei e18cf90d71 [0.67.0-rc.0] Bump version numbers 2021-10-16 14:08:10 -07:00
Nick Gerleman 427ba359e0 Stamp React Native Version Into C++ Code (#28036)
Summary:
The PlatformConstants native module exposes the ability to query the React
Native version used to build native code. This is managed on iOS and Android by
a version bumping script, which replaces module code based on a template.

It is currently difficult to accurately determine this version for out-of-tree C++
platforms (I.e. React Native Windows). The version of upstream react-native we resolve to is ultimately
dependent on the version of react-native chosen a peer dependency, which is not
neccesarily constant given a build of react-native-windows.

We could try to hack around this, and make our native build try to reason about
the resolved pacakge for react-native using a lockfile, but a much cleaner
solution is to embed version into C++ code, similar to what is done for Android
and iOS. This change does that, adding a header with React Native version and
updating the build stamping script to write to it.

Usage sample:

```c++
  constants["reactNativeVersion"] = folly::dynamic::object();
  constants["reactNativeVersion"]["major"] = ReactNativeVersion.Major;
  constants["reactNativeVersion"]["minor"] = ReactNativeVersion.Minor;
  constants["reactNativeVersion"]["patch"] = ReactNativeVersion.Patch;
```
## Changelog

[General] [Added] - Stamp React Native Version Into C++ Code
Pull Request resolved: https://github.com/facebook/react-native/pull/28036

Test Plan: Validated that the bumping script will accurately update the header, can compile under both MSVC and Clang.

Differential Revision: D19865992

Pulled By: hramos

fbshipit-source-id: 9e0b8e9519015bb62c60b9935a234cd367a1926a
2020-02-27 06:42:14 -08:00