Skip to content

Commit

Permalink
[Fix] Use the right version when repackaging Hermes
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Nov 4, 2022
1 parent 41a80f2 commit 4c98055
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,25 +1241,26 @@ jobs:
RELEASE_VERSION=$(get_release_version)
popd
# if RELEASE_VERSION is a stable and a previous artifact already exists, we want to rename it.
# if RELEASE_VERSION is a stable and a previous artifact already exists, we want to repackage the tarball with the right version.
TARBALL_NAME_FOR_MAIN=$(node ./scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE" --releaseVersion "1000.0.0")
TARBALL_FILENAME=$(node ./scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE" --releaseVersion "$RELEASE_VERSION")
if [[ "$RELEASE_VERSION" != "1000.0.0" ]] && [[ -n "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_NAME_FOR_MAIN" ]]; then
mv "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_NAME_FOR_MAIN" "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME"
else
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
rm -rf "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_NAME_FOR_MAIN"
fi
TARBALL_OUTPUT_PATH=$(node ./scripts/hermes/create-tarball.js \
--inputDir ./sdks/hermes \
--buildType "$BUILD_TYPE" \
--releaseVersion "$RELEASE_VERSION" \
--outputDir $TARBALL_OUTPUT_DIR)
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
TARBALL_OUTPUT_PATH=$(node ./scripts/hermes/create-tarball.js \
--inputDir ./sdks/hermes \
--buildType "$BUILD_TYPE" \
--releaseVersion "$RELEASE_VERSION" \
--outputDir $TARBALL_OUTPUT_DIR)
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
fi
- when:
condition:
equal: [ << parameters.flavor >>, "Debug"]
Expand Down

0 comments on commit 4c98055

Please sign in to comment.