@@ -281,8 +281,18 @@ generation script.
281
281
282
282
## Releasing
283
283
284
- The follow steps outline the release process for a maintenance branch (e.g.
285
- releasing the ` vX.Y ` branch as X.Y.Z).
284
+ The following steps outline the release process for both new minor versions (e.g.
285
+ releasing the ` master ` branch as X.Y.0) and patch versions (e.g. releasing the
286
+ ` vX.Y ` branch as X.Y.Z).
287
+
288
+ The command examples below assume that the canonical "mongodb" repository has
289
+ the remote name "mongodb". You may need to adjust these commands if you've given
290
+ the remote another name (e.g. "upstream"). The "origin" remote name was not used
291
+ as it likely refers to your personal fork.
292
+
293
+ It helps to keep your own fork in sync with the "mongodb" repository (i.e. any
294
+ branches and tags on the main repository should also exist in your fork). This
295
+ is left as an exercise to the reader.
286
296
287
297
### Transition JIRA issues and version
288
298
@@ -312,18 +322,13 @@ Update the version and stability constants in `phongo_version.h`. This should
312
322
entail removing the version's "-dev" suffix, changing the stability to
313
323
"stable", and increasing the last digit for ` PHP_MONGO_VERSION_DESC ` :
314
324
315
- ```
316
- #define PHP_MONGODB_VERSION "1.1.8-dev"
317
- #define PHP_MONGODB_STABILITY "devel"
318
- #define PHP_MONGODB_VERSION_DESC 1,1,8,0
319
- ```
320
-
321
- The above would be changed to:
322
-
323
- ```
324
- #define PHP_MONGODB_VERSION "1.1.8"
325
- #define PHP_MONGODB_STABILITY "stable"
326
- #define PHP_MONGODB_VERSION_DESC 1,1,8,1
325
+ ``` diff
326
+ - #define PHP_MONGODB_VERSION "1.1.8-dev"
327
+ - #define PHP_MONGODB_STABILITY "devel"
328
+ - #define PHP_MONGODB_VERSION_DESC 1,1,8,0
329
+ + #define PHP_MONGODB_VERSION "1.1.8"
330
+ + #define PHP_MONGODB_STABILITY "stable"
331
+ + #define PHP_MONGODB_VERSION_DESC 1,1,8,1
327
332
```
328
333
329
334
The Makefile targets for creating the PECL package depend on these constants, so
@@ -352,46 +357,70 @@ After copying release notes, use `make package` to create the package file (e.g.
352
357
$ pecl install -f mongodb-X.Y.Z.tgz
353
358
```
354
359
355
- ### Commit version update and release notes
360
+ ### Update version info
356
361
357
- Commit the modified ` phongo_version.h ` file as "Package X.Y.Z"
362
+ Commit the modified ` phongo_version.h ` file and push this change:
358
363
359
364
```
360
365
$ git add phongo_version.h
361
366
$ git commit -m "Package X.Y.Z"
367
+ $ git push mongodb
362
368
```
363
369
364
- ### Tag release
370
+ > ** Note:** Pushing this commit independently from the subsequent "Back to -dev"
371
+ > commit will ensure that Windows build artifacts are created for the release.
372
+
373
+ ### Ensure Windows build artifacts exist
374
+
375
+ Windows builds are tested by GitHub Actions. Each successful build for a pushed
376
+ commit will produce a build artifact consisting of DLL and PDB files for that
377
+ environment (e.g. 8.0-nts-x64). These build artifacts are later used to create
378
+ release assets (see:
379
+ [ windows-release-build.yml] ( .github/workflows/windows-release-build.yml ) ).
380
+
381
+ Before publishing a release in GitHub, ensure that all Windows builds for the
382
+ tag's commit have succeeded and that the necessary build artifacts have been
383
+ created. This can be done by examining the build artifacts in the workflow run
384
+ summary for the "Package X.Y.Z" commit (i.e. tag target).
385
+
386
+ > ** Note:** the "published" event applies to both releases and pre-releases. See
387
+ > [ Events that trigger workflows: release] ( https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release )
388
+ > for more details.
389
+
390
+ ### Tag the release
365
391
366
- The previous commit will be the target for our release tag :
392
+ Create a tag for the release and push :
367
393
368
394
```
369
395
$ git tag -a -m "Release X.Y.Z" X.Y.Z
396
+ $ git push mongodb --tags
370
397
```
371
398
372
- ### Update version info back to dev
399
+ ### Release PECL package
373
400
374
- After tagging, the version and stability constants in ` phongo_version.h ` should be
375
- updated back to development status.
401
+ The PECL package may be published via the
402
+ [ Release Upload] ( https://pecl.php.net/release-upload.php ) form. You will have
403
+ one chance to confirm the package information after uploading.
376
404
377
- ```
378
- #define PHP_MONGODB_VERSION "1.1.8"
379
- #define PHP_MONGODB_STABILITY "stable"
380
- #define PHP_MONGODB_VERSION_DESC 1,1,8,1
381
- ```
405
+ ### Update version info back to dev
382
406
383
- The above would be changed to:
407
+ After tagging, the version and stability constants in ` phongo_version.h ` should
408
+ be updated back to development status.
384
409
385
- ```
386
- #define PHP_MONGODB_VERSION "1.1.9-dev"
387
- #define PHP_MONGODB_STABILITY "devel"
388
- #define PHP_MONGODB_VERSION_DESC 1,1,9,0
410
+ ``` diff
411
+ - #define PHP_MONGODB_VERSION "1.1.8"
412
+ - #define PHP_MONGODB_STABILITY "stable"
413
+ - #define PHP_MONGODB_VERSION_DESC 1,1,8,1
414
+ + #define PHP_MONGODB_VERSION "1.1.9-dev"
415
+ + #define PHP_MONGODB_STABILITY "devel"
416
+ + #define PHP_MONGODB_VERSION_DESC 1,1,9,0
389
417
```
390
418
391
- Commit this change:
419
+ Commit and push this change:
392
420
393
421
```
394
422
$ git commit -m "Back to -dev" phongo_version.h
423
+ $ git push mongodb
395
424
```
396
425
397
426
> ** Note:** If this is an alpha, beta, or RC release, the version string should
@@ -400,65 +429,69 @@ $ git commit -m "Back to -dev" phongo_version.h
400
429
> "1.4.0beta1" and "beta" for the first beta release, this step would see them
401
430
> ultimately changed to "1.4.0beta2-dev" and "devel".
402
431
403
- ### Push commits and tags
432
+ ### Branch management
433
+
434
+ #### After releasing a new minor version
435
+
436
+ After a new minor version is released (i.e. ` master ` was tagged), a maintenance
437
+ branch should be created for future patch releases:
404
438
405
439
```
406
- $ git push
407
- $ git push --tags
440
+ $ git checkout -b vX.Y
441
+ $ git push mongodb vX.Y
408
442
```
409
443
410
- ### Ensure Windows build artifacts exist
444
+ Update ` phongo_version.h ` for the ` master ` branch:
411
445
412
- Windows builds are tested by GitHub Actions. Each successful build for a pushed
413
- commit will produce a build artifact consisting of DLL and PDB files for that
414
- environment (e.g. 8.0-nts-x64). These build artifacts are later used to create
415
- release assets (see:
416
- [ windows-release-build.yml] )(.github/workflows/windows-release-build.yml).
417
- Before publishing a release in GitHub, ensure that all Windows builds for the
418
- tag's commit have succeeded and that the necessary build artifacts have been
419
- created.
446
+ ``` diff
447
+ - #define PHP_MONGODB_VERSION "1.15.1-dev"
448
+ + #define PHP_MONGODB_VERSION "1.16.0-dev"
449
+ #define PHP_MONGODB_STABILITY "devel"
450
+ - #define PHP_MONGODB_VERSION_DESC 1,15,1,0
451
+ + #define PHP_MONGODB_VERSION_DESC 1,16,0,0
452
+ ```
420
453
421
- Note: the "published" event applies to both releases and pre-releases. See
422
- [ Events that trigger workflows: release] ( https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release )
423
- for more details.
454
+ Commit and push this change:
424
455
425
- ### Release PECL package
456
+ ```
457
+ $ git commit -m "Master is now X.Y-dev" phongo_version.h
458
+ $ git push mongodb
459
+ ```
426
460
427
- The PECL package may be published via the
428
- [ Release Upload] ( https://pecl.php.net/release-upload.php ) form. You will have
429
- one chance to confirm the package information after uploading.
461
+ #### After releasing a patch version
430
462
431
- ### Merge the maintenance branch up to master
463
+ If this was a patch release, the maintenance branch must be merged up to master:
432
464
433
465
```
434
466
$ git checkout master
467
+ $ git pull mongodb master
435
468
$ git merge vX.Y --strategy=ours
436
- $ git push
469
+ $ git push mongodb
437
470
```
438
471
439
472
The ` --strategy=ours ` option ensures that all changes from the merged commits
440
- will be ignored.
473
+ will be ignored. This is OK because we previously ensured that the ` master `
474
+ branch was up-to-date with all code changes in this maintenance branch before
475
+ tagging.
441
476
442
477
### Publish release notes
443
478
444
479
The following template should be used for creating GitHub release notes via
445
480
[ this form] ( https://github.com/mongodb/mongo-php-driver/releases/new ) . The PECL
446
481
package may also be attached to the release notes.
447
482
448
- ```
483
+ ``` markdown
449
484
The PHP team is happy to announce that version X.Y.Z of the [mongodb](https://pecl.php.net/package/mongodb) PHP extension is now available on PECL.
450
485
451
486
**Release Highlights**
452
487
453
488
<one or more paragraphs describing important changes in this release>
454
489
455
- A complete list of resolved issues in this release may be found at:
456
- $JIRA_URL
490
+ A complete list of resolved issues in this release may be found in [JIRA]($JIRA_URL).
457
491
458
492
**Documentation**
459
493
460
- Documentation is available on PHP.net:
461
- https://www.php.net/set.mongodb
494
+ Documentation is available on [PHP.net](https://php.net/set.mongodb).
462
495
463
496
**Installation**
464
497
@@ -485,7 +518,7 @@ release. You may obtain the list from
485
518
If commits from community contributors were included in this release, append the
486
519
following section:
487
520
488
- ```
521
+ ``` markdown
489
522
**Thanks**
490
523
491
524
Thanks for our community contributors for X.Y.Z:
0 commit comments