mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
76598de621
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42774 Reorganise release scripts so that command entry points are grouped based on execution context, which also reflects dependencies between scripts. Also: - Document the current behaviours of these scripts. - Relocate utils out of the root contents. - Replace `exec` call to `set-rn-version` script with function import. NOTE: `yarn trigger-react-native-release` (documented command in release process) is unchanged, since this is aliased from `package.json`. ``` ├── releases │ ├── templates/ │ ├── utils/ │ ├── remove-new-arch-flags.js │ ├── set-rn-version.js │ └── update-template-package.js ├── releases-ci │ ├── prepare-package-for-release.js │ └── publish-npm.js └── releases-local └── trigger-react-native-release.js ``` Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D53274341 fbshipit-source-id: eec2befc43e7a47fd821b2e2bcc818ddffbb6cf7
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @flow
|
|
* @format
|
|
* @oncall react_native
|
|
*/
|
|
|
|
/*::
|
|
import type {Version} from '../utils/version-utils';
|
|
*/
|
|
|
|
module.exports = ({version} /*: {version: Version} */) /*: string */ => `/**
|
|
* 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.
|
|
*
|
|
* ${'@'}generated by scripts/releases/set-rn-version.js
|
|
*/
|
|
|
|
package com.facebook.react.modules.systeminfo;
|
|
|
|
import com.facebook.react.common.MapBuilder;
|
|
|
|
import java.util.Map;
|
|
|
|
public class ReactNativeVersion {
|
|
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
|
"major", ${version.major},
|
|
"minor", ${version.minor},
|
|
"patch", ${version.patch},
|
|
"prerelease", ${
|
|
version.prerelease != null ? `"${version.prerelease}"` : 'null'
|
|
});
|
|
}
|
|
`;
|