Skip to content

Commit 9d174bd

Browse files
authored
Relax branch-alias on dev-master to avoid update on each release (#1277)
1 parent bccc36a commit 9d174bd

File tree

2 files changed

+13
-30
lines changed

2 files changed

+13
-30
lines changed

Diff for: RELEASING.md

+12-29
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ changes in this maintenance branch. This is important because we will later
4141
merge the ensuing release commits up to master with `--strategy=ours`, which
4242
will ignore changes from the merged commits.
4343

44-
## Update composer.json and CI matrices
44+
## Update extension requirement
4545

46-
This is especially important before releasing a new minor version.
46+
In `composer.json`, ensure that the version of `ext-mongodb` is correct for
47+
the library version being released.
48+
49+
## Update CI matrices
4750

48-
Ensure that the extension requirement and branch alias in `composer.json` are
49-
correct for the library version being released. For example, the 1.15.0 release
50-
of the library should depend on version `^1.15.0` of the extension and master
51-
branch alias should be `1.15.x-dev`.
51+
This is especially important before releasing a new minor version.
5252

5353
If this is the first release of a minor version for the library, it is likely
5454
following an extension release. The `vars` for calling `compile extension` from
@@ -90,21 +90,22 @@ After releasing a new major or minor version (e.g. 1.9.0), a maintenance branch
9090
1.9.1) would then be done within that branch and any development for the next
9191
major or minor release can continue in master.
9292

93-
After creating a maintenance branch, the `extra.branch-alias.dev-master` field
94-
in the master branch's `composer.json` file should be updated. For example,
95-
after branching v1.9, `composer.json` in the master branch may still read:
93+
When work begins on a major new version, create a maintenance branch for the
94+
last minor version and update the `extra.branch-alias.dev-master` field
95+
in the master branch's `composer.json` file. For example, after branching v1.99,
96+
`composer.json` in the master branch may still read:
9697

9798
```
9899
"branch-alias": {
99-
"dev-master": "1.9.x-dev"
100+
"dev-master": "1.x-dev"
100101
}
101102
```
102103

103104
The above would be changed to:
104105

105106
```
106107
"branch-alias": {
107-
"dev-master": "1.10.x-dev"
108+
"dev-master": "2.x-dev"
108109
}
109110
```
110111

@@ -124,24 +125,6 @@ $ git checkout -b vX.Y
124125
$ git push mongodb vX.Y
125126
```
126127

127-
Update the master branch alias in `composer.json`:
128-
129-
```diff
130-
"extra": {
131-
"branch-alias": {
132-
- "dev-master": "1.15.x-dev"
133-
+ "dev-master": "1.16.x-dev"
134-
}
135-
},
136-
```
137-
138-
Commit and push this change:
139-
140-
```console
141-
$ git commit -m "Master is now X.Y-dev" composer.json
142-
$ git push mongodb
143-
```
144-
145128
### After releasing a patch version
146129

147130
If this was a patch release, the maintenance branch must be merged up to master:

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"extra": {
5555
"branch-alias": {
56-
"dev-master": "1.19.x-dev"
56+
"dev-master": "1.x-dev"
5757
}
5858
},
5959
"config": {

0 commit comments

Comments
 (0)