Skip to content

Commit 9daca21

Browse files
committed
Remove copying of libmongoc version file
1 parent 90dd212 commit 9daca21

File tree

10 files changed

+16
-34
lines changed

10 files changed

+16
-34
lines changed

.evergreen/compile-unix.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ if [ -n "$LIBMONGOC_VERSION" ]; then
7272
echo "Finding Python3 binary... done."
7373

7474
php scripts/update-submodule-sources.php
75-
76-
# We invoke python manually as it may not be in the path
77-
pushd src/libmongoc/
78-
$PYTHON build/calc_release_version.py > ../LIBMONGOC_VERSION_CURRENT
79-
popd
8075
fi
8176

8277
phpize

.evergreen/config/functions.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ functions:
140140
echo "Checking out libmongoc version: ${LIBMONGOC_VERSION}"
141141
git fetch
142142
git checkout ${LIBMONGOC_VERSION}
143-
# Note: compile-unix.sh will run `make libmongoc-version-current`
144143
fi
145144
- command: subprocess.exec
146145
type: test

CONTRIBUTING.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ always refer to libmongoc.
203203
```shell
204204
cd src/libmongoc
205205
git fetch
206-
git checkout 1.20.0
206+
git checkout 2.1.0
207207
```
208208

209209
During development, it may be necessary to temporarily point the submodule to a
@@ -218,24 +218,16 @@ git submodules set-url src/libmongoc https://github.com/<owner>/<repo>.git
218218
git submodules set-branch -b <branch> src/libmongoc
219219
```
220220

221-
#### Ensure version information is correct
221+
#### Ensure version information is correct (libmongocrypt only)
222222

223-
Various build processes and tools rely on the version files to infer version
224-
information. This file can be regenerated using Makefile targets:
223+
For libmongocrypt, version information needs to be updated after updating to
224+
a newer submodule version. This can be done by running the corresponding make
225+
target:
225226

226227
```shell
227-
make libmongoc-version-current
228+
make libmongocrypt-version-current
228229
```
229230

230-
Alternatively, the `build/calc_release_version.py` script in the submodule can
231-
be executed directly.
232-
233-
Note: If the submodule points to a non-release, non-master branch, the script
234-
may fail to correctly detect the version. This issue is being tracked in
235-
[CDRIVER-3315](https://jira.mongodb.org/browse/CDRIVER-3315) and can be safely ignored since this should only happen
236-
during development (any PHP driver release should point to a tagged submodule
237-
version).
238-
239231
#### Update sources in build configurations
240232

241233
The Autotools and Windows build configurations (`config.m4` and `config.w32`,
@@ -261,11 +253,11 @@ libmongoc and libbson.
261253
For example, the following lines might be updated for libmongoc:
262254

263255
```
264-
if $PKG_CONFIG libmongoc-1.0 --atleast-version 1.20.0; then
256+
if $PKG_CONFIG mongoc2 --atleast-version 2.1.0; then
265257
266258
...
267259
268-
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 1.20.0)
260+
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 2.1.0)
269261
```
270262

271263
#### Update tested versions in Evergreen configuration (libmongoc only)
@@ -277,7 +269,7 @@ information about the build tasks and where they are used. In general, we test
277269
against two additional versions of libmongoc:
278270

279271
- The upcoming patch release of the current libmongoc minor version (e.g. the
280-
`r1.x` branch)
272+
`r2.x` branch)
281273
- The upcoming minor release of libmongoc (e.g. the `master` branch)
282274

283275
#### Update sources in PECL package generation script
@@ -307,5 +299,6 @@ test suite passes. Once done, commit the changes to all of the above
307299
files/paths. For example:
308300

309301
```shell
310-
git commit -m "Bump libmongoc to 1.20.0" config.m4 config.w32 src/libmongoc src/LIBMONGOC_VERSION_CURRENT sbom.json
302+
git commit -m "Bump libmongoc to 2.1.0" config.m4 config.w32 src/libmongoc sbom.
303+
json
311304
```

Makefile.frag

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: mv-coverage lcov-coveralls lcov-local coverage coveralls format format-changed format-check test-clean package package.xml libmongoc-version-current libmongocrypt-version-current generate-function-map
1+
.PHONY: mv-coverage lcov-coveralls lcov-local coverage coveralls format format-changed format-check test-clean package package.xml libmongocrypt-version-current generate-function-map
22

33
ifneq (,$(realpath $(EXTENSION_DIR)/json.so))
44
PHP_TEST_SHARED_EXTENSIONS := "-d" "extension=$(EXTENSION_DIR)/json.so" $(PHP_TEST_SHARED_EXTENSIONS)
@@ -63,9 +63,6 @@ package:
6363
package.xml:
6464
php bin/prep-release.php $(MONGODB_VERSION) $(MONGODB_STABILITY) $(RELEASE_NOTES_FILE)
6565

66-
libmongoc-version-current:
67-
cp src/libmongoc/VERSION_CURRENT src/LIBMONGOC_VERSION_CURRENT
68-
6966
libmongocrypt-version-current:
7067
cd src/libmongocrypt/ && python etc/calc_release_version.py > ../LIBMONGOCRYPT_VERSION_CURRENT
7168

bin/prep-release.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ function get_files() {
3939
"scripts/autotools/*/*.{m4}",
4040

4141
"src/*.{c,h}",
42-
"src/LIBMONGOC_VERSION_CURRENT",
4342
"src/LIBMONGOCRYPT_VERSION_CURRENT",
4443

4544
"src/MongoDB/*.{c,h}",

config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function mongodb_generate_header(inpath, outpath, replacements)
2525

2626
function mongodb_parse_libmongoc_version_file(prefix)
2727
{
28-
var infile = FSO.OpenTextFile(configure_module_dirname + "/src/LIBMONGOC_VERSION_CURRENT", 1);
28+
var infile = FSO.OpenTextFile(configure_module_dirname + "/src/libmongoc/VERSION_CURRENT", 1);
2929
var version = infile.ReadLine();
3030
infile.Close();
3131

scripts/autotools/libbson/Versions.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BSON_CURRENT_FILE=[]PHP_EXT_SRCDIR(mongodb)[/src/LIBMONGOC_VERSION_CURRENT]
1+
BSON_CURRENT_FILE=[]PHP_EXT_SRCDIR(mongodb)[/src/libmongoc/VERSION_CURRENT]
22
libbson_VERSION_FULL=$(cat $BSON_CURRENT_FILE)
33

44
dnl Ensure newline for "cut" implementations that need it, e.g. HP-UX.

scripts/autotools/libmongoc/Versions.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MONGOC_CURRENT_FILE=[]PHP_EXT_SRCDIR(mongodb)[/src/LIBMONGOC_VERSION_CURRENT]
1+
MONGOC_CURRENT_FILE=[]PHP_EXT_SRCDIR(mongodb)[/src/libmongoc/VERSION_CURRENT]
22
libmongoc_VERSION_FULL=$(cat $MONGOC_CURRENT_FILE)
33

44
dnl Ensure newline for "cut" implementations that need it, e.g. HP-UX.

scripts/update-sbom.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
44
ROOT_DIR=$(realpath "${SCRIPT_DIR}/../")
55
PURLS_FILE="${ROOT_DIR}/purls.txt"
66

7-
LIBMONGOC_VERSION=$(cat ${ROOT_DIR}/src/LIBMONGOC_VERSION_CURRENT | tr -d '[:space:]')
7+
LIBMONGOC_VERSION=$(cat ${ROOT_DIR}/src/libmongoc/VERSION_CURRENT | tr -d '[:space:]')
88
LIBMONGOCRYPT_VERSION=$(cat ${ROOT_DIR}/src/LIBMONGOCRYPT_VERSION_CURRENT | tr -d '[:space:]')
99

1010
# Generate purls file from stored versions

src/LIBMONGOC_VERSION_CURRENT

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)