-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RN][GHA] Remove the trigger-react-native-release to use the GHA work…
…flow_dispatch UI
- Loading branch information
1 parent
14ccf6b
commit c63a902
Showing
7 changed files
with
158 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* 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 | ||
*/ | ||
|
||
const {parseVersion} = require('./utils/version-utils'); | ||
const {parseArgs} = require('@pkgjs/parseargs'); | ||
|
||
const config = { | ||
options: { | ||
is_latest_on_npm: { | ||
type: 'boolean', | ||
short: 'l', | ||
default: false, | ||
}, | ||
version: { | ||
type: 'string', | ||
short: 'v', | ||
}, | ||
branch: { | ||
type: 'string', | ||
short: 'b', | ||
}, | ||
help: {type: 'boolean'}, | ||
}, | ||
}; | ||
|
||
async function main() { | ||
const { | ||
values: {help, is_latest_on_npm: latest, version: version, branch: branch}, | ||
} = parseArgs(config); | ||
|
||
if (help) { | ||
console.log(` | ||
Usage: node ./scripts/releases/compute-npm-tag.js [OPTIONS] | ||
Validates a version string for a given build type. | ||
Options: | ||
--is-latest-on-npm Whether we need to publish this as latest on NPM or not. Defaults to false. | ||
--version The new version string. | ||
--branch The branch name. | ||
`); | ||
return; | ||
} | ||
|
||
const {prerelease} = parseVersion(version, 'release'); | ||
|
||
const npmTag = latest ? 'latest' : !prerelease ? branch : 'next'; | ||
|
||
console.log(npmTag); | ||
return; | ||
} | ||
|
||
if (require.main === module) { | ||
// eslint-disable-next-line no-void | ||
void main(); | ||
} |
Oops, something went wrong.