Skip to content

Commit

Permalink
Update Build Scripts to not depend on git
Browse files Browse the repository at this point in the history
* JS team is doing build optimizations which allow for building from source
* Using the build scripts would require packing `.git` into the node module
* Use alternative method will allow for js to define the version and
  if version is not defined, the script will fallback to what cmake is doing,
  which is using `git describe`.
  • Loading branch information
takameyer committed Jan 20, 2024
1 parent 1d68948 commit b4814f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

### Internals
* Add support for chunked transfer encoding when using `HTTPParser`.
* Refactored version resolution for the `build-apple-device.sh` script. ([#7263](https://github.com/realm/realm-core/pull/7263))

----------------------------------------------

Expand Down
6 changes: 2 additions & 4 deletions tools/build-apple-device.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ if [[ -n "${DEVELOPER_DIR}" && ! -d "${DEVELOPER_DIR}" ]]; then
fi

SCRIPT="$(basename "${BASH_SOURCE[0]}")"
VERSION="$(git describe)"

function usage {
echo "Usage: ${SCRIPT} -p <platform> [-c <configuration>] [-v <version>] [-f <cmake-flags>]"
Expand All @@ -37,8 +36,8 @@ while getopts ":p:c:v:f:" opt; do
case "${opt}" in
p) platform="${OPTARG}";;
c) buildType="${OPTARG}";;
v) VERSION="${OPTARG}";;
f) CMAKE_FLAGS=${OPTARG};;
f) CMAKE_FLAGS="${CMAKE_FLAGS} ${OPTARG}";;
v) CMAKE_FLAGS="${CMAKE_FLAGS} -DREALM_VERSION=${OPTARG}";;
*) usage;;
esac
done
Expand All @@ -61,7 +60,6 @@ mkdir -p build-xcode-platforms
cd build-xcode-platforms
cmake \
-D CMAKE_TOOLCHAIN_FILE="../tools/cmake/xcode.toolchain.cmake" \
-D REALM_VERSION="${VERSION}" \
-D REALM_BUILD_LIB_ONLY=ON \
-D CPACK_PACKAGE_DIRECTORY=.. \
-D CMAKE_XCODE_ATTRIBUTE_SDKROOT="$sdkroot" \
Expand Down

0 comments on commit b4814f4

Please sign in to comment.