Skip to content

Relax branch-alias on dev-master to avoid update on each release #1277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 12 additions & 29 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ changes in this maintenance branch. This is important because we will later
merge the ensuing release commits up to master with `--strategy=ours`, which
will ignore changes from the merged commits.

## Update composer.json and CI matrices
## Update extension requirement

This is especially important before releasing a new minor version.
In `composer.json`, ensure that the version of `ext-mongodb` is correct for
the library version being released.

## Update CI matrices

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

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

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

```
"branch-alias": {
"dev-master": "1.9.x-dev"
"dev-master": "1.x-dev"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You won't need branch-alias in v2 if you decide to delete the master branch and use a branch named 2.x or 2.0.

}
```

The above would be changed to:

```
"branch-alias": {
"dev-master": "1.10.x-dev"
"dev-master": "2.x-dev"
}
```

Expand All @@ -124,24 +125,6 @@ $ git checkout -b vX.Y
$ git push mongodb vX.Y
```

Update the master branch alias in `composer.json`:

```diff
"extra": {
"branch-alias": {
- "dev-master": "1.15.x-dev"
+ "dev-master": "1.16.x-dev"
}
},
```

Commit and push this change:

```console
$ git commit -m "Master is now X.Y-dev" composer.json
$ git push mongodb
```

### After releasing a patch version

If this was a patch release, the maintenance branch must be merged up to master:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.19.x-dev"
"dev-master": "1.x-dev"
}
},
"config": {
Expand Down