Skip to content

Commit b4b01be

Browse files
authored
RCORE-1928 Make dependencies.list a YAML file (#7394)
1 parent 919a4b1 commit b4b01be

11 files changed

+31
-27
lines changed

Android.bp

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ cc_object {
115115
genrule {
116116
name: "version_numbers.hpp",
117117
srcs: [
118-
"dependencies.list",
118+
"dependencies.yml",
119119
"src/realm/version_numbers.hpp.in",
120120
],
121121
out: ["realm/version_numbers.hpp"],

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
### Internals
2020
* Fix several crashes when running the object store benchmarks ([#7403](https://github.com/realm/realm-core/pull/7403)).
21+
* The `dependencies.list` file that defines the realm core library version and the versions of its dependencies is now a YAML file called `dependencies.yml` ([PR #7394](https://github.com/realm/realm-core/pull/7394)).
2122
* Remove SetElementEquals and SetElementLessThan, as Mixed now uses the same comparisons as Set did.
2223

2324
----------------------------------------------

Jenkinsfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobWrapper {
2828
getSourceArchive()
2929
stash includes: '**', name: 'core-source', useDefaultExcludes: false
3030

31-
dependencies = readProperties file: 'dependencies.list'
32-
echo "Version in dependencies.list: ${dependencies.VERSION}"
31+
dependencies = readYaml file: 'dependencies.yml'
32+
echo "Version in dependencies.yml: ${dependencies.VERSION}"
3333
gitTag = readGitTag()
3434
gitSha = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(8)
3535
gitDescribeVersion = sh(returnStdout: true, script: 'git describe --tags').trim()

dependencies.list

-7
This file was deleted.

dependencies.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PACKAGE_NAME: realm-core
2+
VERSION: 14.1.0
3+
OPENSSL_VERSION: 3.2.0
4+
ZLIB_VERSION: 1.2.13
5+
# https://github.com/10gen/baas/commits
6+
# dd016 is 2024 Feb 22
7+
BAAS_VERSION: dd01629d83b86292af9c59ebe2a28673c2e559cf

evergreen/install_baas.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,16 @@ git config --global url."[email protected]:".insteadOf "https://github.com/"
365365

366366
# If a baas branch or commit version was not provided use the one locked in our dependencies
367367
if [[ -z "${BAAS_VERSION}" ]]; then
368-
dep_file="dependencies.list"
368+
dep_file="dependencies.yml"
369369
test_path1="${BASE_PATH}/../${dep_file}"
370370
test_path2="${BASE_PATH}/${dep_file}"
371371
if [[ -f "${test_path1}" ]]; then
372372
# if this was run locally then check up a directory
373-
get_var_from_file BAAS_VERSION "${test_path1}"
373+
BAAS_VERSION=$(sed -rn 's/^BAAS_VERSION: (.*)/\1/p' < "${test_path1}")
374374
elif [[ -f "${test_path2}" ]]; then
375375
# if this is run from an evergreen remote host
376-
# then the dependencies.list file has been copied over
377-
get_var_from_file BAAS_VERSION "${test_path2}"
376+
# then the dependencies.yml file has been copied over
377+
BAAS_VERSION=$(sed -rn 's/^BAAS_VERSION: (.*)/\1/p' < "${test_path2}")
378378
else
379379
echo "could not find '${test_path1}' or '${test_path2}'"
380380
ls "${BASE_PATH}/.."

evergreen/setup_baas_host_local.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ echo "Transferring setup scripts to ${SSH_USER}:${FILE_DEST_DIR}"
223223
scp "${SSH_OPTIONS[@]}" -o ConnectTimeout=60 "${BAAS_HOST_VARS}" "${SSH_USER}:${FILE_DEST_DIR}/"
224224
# Copy the entire evergreen/ directory from the working copy of realm-core to the remote host
225225
# This ensures the remote host the latest copy, esp when running evergreen patches
226-
# dependencies.list contains the BAAS_VERSION to use
226+
# dependencies.yml contains the BAAS_VERSION to use
227227
echo "Transferring evergreen scripts to ${SSH_USER}:${FILE_DEST_DIR}"
228-
cp "${EVERGREEN_PATH}/../dependencies.list" "${EVERGREEN_PATH}/"
228+
cp "${EVERGREEN_PATH}/../dependencies.yml" "${EVERGREEN_PATH}/"
229229
scp -r "${SSH_OPTIONS[@]}" -o ConnectTimeout=60 "${EVERGREEN_PATH}/" "${SSH_USER}:${FILE_DEST_DIR}/"
230230

231231
BAAS_TUNNELS=()

tools/cmake/GetVersion.cmake

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
file(STRINGS "${RealmCore_SOURCE_DIR}/dependencies.list" DEPENDENCIES)
1+
file(STRINGS "${RealmCore_SOURCE_DIR}/dependencies.yml" DEPENDENCIES)
22
set(VALID_DEPENDENCIES "")
33
foreach(LINE IN LISTS DEPENDENCIES)
4-
string(REGEX MATCHALL "([^=]+)" KEY_VALUE ${LINE})
4+
string(REGEX MATCHALL "([^:]+)" KEY_VALUE ${LINE})
55
list(LENGTH KEY_VALUE MATCH_SIZE)
66
if (MATCH_SIZE GREATER_EQUAL 2)
77
list(GET KEY_VALUE 0 KEY)
8+
if ("${KEY}" MATCHES "^#")
9+
continue()
10+
endif()
811
list(GET KEY_VALUE 1 VALUE)
9-
set(DEP_${KEY} ${VALUE})
10-
set(VALID_DEPENDENCIES "${VALID_DEPENDENCIES} ${LINE}")
12+
string(STRIP "${VALUE}" STRIPPED_VALUE)
13+
set(DEP_${KEY} ${STRIPPED_VALUE})
14+
set(VALID_DEPENDENCIES "${VALID_DEPENDENCIES} ${KEY}=\"${STRIPPED_VALUE}\"")
1115
endif()
1216
endforeach()
1317

tools/generate-version-numbers-for-soong.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22

3-
source $1
4-
5-
version_and_extra=( ${VERSION//-/ } )
3+
realm_version=$(sed -rn 's/^VERSION: (.*)/\1/p' < "$1")
4+
version_and_extra=( ${$realm_version//-/ } )
65
version_only=${version_and_extra[0]}
76
extra=${version_and_extra[1]}
87

tools/release-init.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ git branch release/${realm_version}
1717
git push -u origin release/${realm_version}
1818
git checkout -b prepare-$realm_version
1919

20-
# update dependencies.list
21-
sed -i.bak -e "s/^VERSION.*/VERSION=${realm_version}/" "${project_dir}/dependencies.list"
22-
rm "${project_dir}/dependencies.list.bak" || exit 1
20+
# update dependencies.yml
21+
sed -i.bak -e "s/^VERSION.*/VERSION: ${realm_version}/" "${project_dir}/dependencies.yml"
22+
rm "${project_dir}/dependencies.yml.bak" || exit 1
2323

2424
# update Package.swift
2525
sed -i.bak -e "s/^let versionStr =.*/let versionStr = \"${realm_version}\"/" "${project_dir}/Package.swift"

tools/release-tag.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
1111
fi
1212

1313
project_dir=$(git rev-parse --show-toplevel)
14-
realm_version=$(grep ^VERSION "${project_dir}/dependencies.list" | cut -f 2 -d=)
14+
realm_version=$(sed -rn 's/^VERSION: (.*)/\1/p' < "${project_dir}/dependencies.yml")
1515
tag=v${realm_version}
1616
git tag -m \""$1"\" "${tag}"
1717
git push origin "${tag}"

0 commit comments

Comments
 (0)