mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
1908d50ba4
Summary: This fixes build failures where `CIRCLE_PR_NUMBER` is not set. This can happen if the PR did not come from a fork. ## Changelog [Internal] [Fixed] - Fix CIRCLE_PR_NUMBER may not always be set Pull Request resolved: https://github.com/facebook/react-native/pull/28640 Test Plan: Report bundle size step should pass on both this PR and https://github.com/facebook/react-native/issues/28641. Reviewed By: cpojer Differential Revision: D21045553 Pulled By: TheSavior fbshipit-source-id: fdfcb1bb88a96345b78ca69c49623df71d4cd608
20 lines
583 B
Bash
Executable File
20 lines
583 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
case $1 in
|
|
"android" | "ios")
|
|
GITHUB_OWNER=${CIRCLE_PROJECT_USERNAME:-facebook} \
|
|
GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native} \
|
|
GITHUB_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}" \
|
|
GITHUB_REF=${CIRCLE_BRANCH} \
|
|
GITHUB_SHA=${CIRCLE_SHA1} \
|
|
node bots/report-bundle-size.js "$1"
|
|
;;
|
|
*)
|
|
echo "Syntax: $0 [android | ios]"
|
|
exit 1
|
|
esac
|