Skip to content

Commit

Permalink
fix(release scripts): backport fixes from 0.71 into main (#35258)
Browse files Browse the repository at this point in the history
Summary:
This PR backport two fixes we did in 0.71 to unblock the release process:
* the change in `publish-npm` is needed because of the introduction of .strict() from 4f3ca8f
* the removal of the other script (added originally here e4b5d3e) is because:
  1) that step is not needed anymore (we don't publish/upload hermes artifacts to the GH release)
  2) by the time this job gets run the release crew has already setup the GH release
  3) the logic for the versioning was broken and even on the 0.71-rc pipeline it was tagging stuff as 1000.0.0

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Fixed] - Fix release scripts for "release" pipeline scenario

Pull Request resolved: #35258

Test Plan: The fact that 0.71-rc0 was released is the ✅ for this.

Reviewed By: jacdebug

Differential Revision: D41120888

Pulled By: cipolleschi

fbshipit-source-id: 06d108f0659ad1db53c6324fe1d735f52c34a3c5
  • Loading branch information
kelset authored and facebook-github-bot committed Nov 8, 2022
1 parent ea73a66 commit cfa25e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 160 deletions.
37 changes: 0 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1492,43 +1492,6 @@ jobs:
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}"
# END: Stable releases

# START: Stables and commitlies
- when:
condition:
or:
- equal: [ "release", << parameters.release_type >> ]
- equal: [ "dry-run", << parameters.release_type >> ]
steps:
- run:
name: Install dependencies
command: apt update && apt install -y jq jo
- run:
name: Create draft GitHub Release and upload Hermes binaries
command: |
RELEASE_VERSION=$(cat build/.version)
if [[ << parameters.release_type >> == "release" ]]; then
GIT_TAG=$CIRCLE_TAG
elif [[ << parameters.release_type >> == "dry-run" ]]; then
GIT_TAG=v1000.0.0
fi
ARTIFACTS=("")
for build_type in "Debug" "Release"; do
TARBALL_FILENAME=$(node ./scripts/hermes/get-tarball-name.js \
--buildType $build_type \
--releaseVersion $RELEASE_VERSION)
ARTIFACTS+=("$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME")
done
./scripts/circleci/create_github_release.sh \
<< parameters.release_type >> \
$GIT_TAG \
$RELEASE_VERSION \
$GITHUB_TOKEN \
"${ARTIFACTS[@]}"
# END: Stable and commitlies

# -------------------------
# JOBS: Nightly
# -------------------------
Expand Down
123 changes: 0 additions & 123 deletions scripts/circleci/create_github_release.sh

This file was deleted.

5 changes: 5 additions & 0 deletions scripts/publish-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ const argv = yargs
type: 'boolean',
default: false,
})
.option('r', {
alias: 'release', // useless but needed for CI
type: 'boolean',
default: false,
})
.strict().argv;
const nightlyBuild = argv.nightly;
const dryRunBuild = argv.dryRun;
Expand Down

0 comments on commit cfa25e0

Please sign in to comment.