Skip to content

Commit 5107abb

Browse files
committed
Don't use git to get the repo root
1 parent 1f52982 commit 5107abb

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

examples/apple/coreml/scripts/build_executor_runner.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ for arg in "$@"; do
3333
esac
3434
done
3535

36-
37-
EXECUTORCH_ROOT_PATH=$(git rev-parse --show-toplevel)
36+
EXECUTORCH_ROOT_PATH=$(realpath -m "$0/../../../../..")
3837
COREML_DIR_PATH="$EXECUTORCH_ROOT_PATH/backends/apple/coreml"
3938
EXAMPLES_COREML_DIR_PATH="$EXECUTORCH_ROOT_PATH/examples/apple/coreml"
4039
IOS_TOOLCHAIN_PATH="$EXECUTORCH_ROOT_PATH/third-party/ios-cmake/ios.toolchain.cmake"

scripts/build_apple_frameworks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PRESETS=("ios" "ios-simulator" "macos")
1212
# To support backwards compatibility, we want to retain the same output directory.
1313
PRESETS_RELATIVE_OUT_DIR=("ios" "simulator" "macos")
1414

15-
SOURCE_ROOT_DIR=$(git rev-parse --show-toplevel)
15+
SOURCE_ROOT_DIR=$(realpath -m "$0/../..")
1616
OUTPUT_DIR="${SOURCE_ROOT_DIR}/cmake-out"
1717
HEADERS_RELATIVE_PATH="include"
1818
HEADERS_ABSOLUTE_PATH="${OUTPUT_DIR}/${HEADERS_RELATIVE_PATH}"

scripts/release/apply-release-changes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
set -eou pipefail
2020

21-
GIT_TOP_DIR=$(git rev-parse --show-toplevel)
21+
GIT_TOP_DIR=$(realpath -m "$0/../../..")
2222
RELEASE_VERSION=${RELEASE_VERSION:-$(cut -d'.' -f1-2 "${GIT_TOP_DIR}/version.txt")}
2323
RELEASE_BRANCH="release/${RELEASE_VERSION}"
2424

scripts/release/cut-release-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or to cut from main branch:
2020

2121
set -eou pipefail
2222

23-
GIT_TOP_DIR=$(git rev-parse --show-toplevel)
23+
GIT_TOP_DIR=$(realpath -m "$0/../../..")
2424
GIT_REMOTE=${GIT_REMOTE:-origin}
2525
GIT_BRANCH_TO_CUT_FROM=${GIT_BRANCH_TO_CUT_FROM:-viable/strict}
2626

0 commit comments

Comments
 (0)