mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Currently, the tasks for downloading, expanding, and preparing Hermes to be built for Apple targets are split across the Circle CI and CocoaPods configs. This diff sets out to consolidate these tasks into a single hermes-utils.js script that can be reused across CI and build systems. The release script that is used to assign the Hermes tag for a given React Native version has been moved into `scripts/hermes`. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D36329356 fbshipit-source-id: 0222070adf201fa533b607a183471396d45c6caf
48 lines
1.1 KiB
JavaScript
Executable File
48 lines
1.1 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
/**
|
|
* 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.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
/**
|
|
* This script walks a releaser through bumping the Hermes version for a release.
|
|
* It needs be executed on a release branch.
|
|
*/
|
|
const {exit} = require('shelljs');
|
|
const yargs = require('yargs');
|
|
const inquirer = require('inquirer');
|
|
const {setHermesTag} = require('./hermes-utils');
|
|
|
|
let argv = yargs.option('t', {
|
|
alias: 'tag',
|
|
describe:
|
|
'Hermes release tag to use for this React Native release, ex. hermes-2022-02-21-RNv0.68.0',
|
|
required: true,
|
|
}).argv;
|
|
|
|
async function main() {
|
|
const hermesTag = argv.tag;
|
|
const {confirmHermesTag} = await inquirer.prompt({
|
|
type: 'confirm',
|
|
name: 'confirmHermesTag',
|
|
message: `Do you want to use the Hermes release tagged "${hermesTag}"?`,
|
|
});
|
|
|
|
if (!confirmHermesTag) {
|
|
console.log('Aborting.');
|
|
return;
|
|
}
|
|
|
|
setHermesTag(hermesTag);
|
|
}
|
|
|
|
main().then(() => {
|
|
exit(0);
|
|
});
|