Use variables for release identifiers
+94
-51
@@ -1,95 +1,121 @@
|
||||
### Create a release branch
|
||||
|
||||
The release process involves a couple changes to the repository: updating the version number in package.json and adding a changelog. In order to make these release-related changes, create a branch in your repository clone. Note that all the examples below use 3.1.0 as the release version (and 3.0.0 as the previous release). You'll want to use the appropriate version numbers for the release you're working toward.
|
||||
The release process involves a couple changes to the repository: updating the version number in package.json and adding a changelog. In order to make these release-related changes, create a branch in your repository clone. Note that all the examples below use ${R1} as the release version, ${R0} as the previous release, and ${R2} as the next release. You'll want to use the appropriate version numbers for the release you're working toward.
|
||||
|
||||
git checkout -b release-v3.1.0 openlayers/main
|
||||
Set the R0, R1, and R2 variables. For example:
|
||||
```
|
||||
R0=6.10.0 # previous release
|
||||
R1=6.11.0 # this release
|
||||
R2=6.11.1 # next release
|
||||
```
|
||||
|
||||
Check out a new release branch:
|
||||
```
|
||||
git fetch openlayers
|
||||
git checkout -b release-v${R1} openlayers/main
|
||||
```
|
||||
|
||||
### Create a changelog
|
||||
|
||||
Create a changelog for all merges to `main` since the previous release. You'll want to create a log for all changes since the previous release and name the resulting file like the target release.
|
||||
|
||||
./tasks/changelog.sh v3.0.0.. >> changelog/v3.1.0.md
|
||||
```
|
||||
echo "# ${R1}\n\n#### List of all changes\n\nSee below for a complete list of features and fixes.\n" > changelog/v${R1}.md
|
||||
./tasks/changelog.sh v${R0}.. >> changelog/v${R1}.md
|
||||
```
|
||||
|
||||
Edit the resulting changelog file with any summary notes or special upgrade considerations.
|
||||
|
||||
You can extract the upgrade considerations from the [`changelog/upgrade-notes.md`](https://github.com/openlayers/openlayers/blob/main/changelog/upgrade-notes.md) file, by looking at any upgrade notes since the previous release.
|
||||
|
||||
If the [`changelog/upgrade-notes.md`](https://github.com/openlayers/openlayers/blob/main/changelog/upgrade-notes.md)
|
||||
file does not already have a header for the current release, create a header with the version number (e.g. `### v3.1.0`).
|
||||
|
||||
Commit your changes:
|
||||
|
||||
git add changelog
|
||||
git commit -m 'Changelog for v3.1.0'
|
||||
file does not already have a header for the current release, create a header with the version number.
|
||||
|
||||
### Update `package.json`
|
||||
|
||||
Update the version numbers in `package.json` to reflect the target release.
|
||||
|
||||
E.g. in `package.json`
|
||||
```json
|
||||
{
|
||||
"name": "openlayers",
|
||||
"version": "3.1.0"
|
||||
}
|
||||
```
|
||||
# mac flavor sed
|
||||
sed -i '' "s/\"version\": \".*\"/\"version\": \"${R1}\"/" package.json
|
||||
```
|
||||
|
||||
To pick this change up in `package-lock.json`, run
|
||||
|
||||
npm install
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
Commit the version changes:
|
||||
Commit the version update and new changelog:
|
||||
|
||||
git add package.json package-lock.json
|
||||
git commit -m 'Update package version to 3.1.0'
|
||||
```
|
||||
git add package.json package-lock.json changelog
|
||||
git commit -m "Updates for the ${R1} release"
|
||||
```
|
||||
|
||||
### Pull request
|
||||
|
||||
Create a pull request for the release branch. This allows for any final review of upgrade notes or other parts of the changelog. Do not merge yet!
|
||||
|
||||
```
|
||||
git push openlayers release-v${R1}
|
||||
```
|
||||
|
||||
### Tag
|
||||
|
||||
Tag the release:
|
||||
|
||||
# tag the latest from openlayers/release-v3.1.0
|
||||
git tag -a v3.1.0 -m '3.1.0'
|
||||
```
|
||||
# tag the latest from openlayers/release-v${R1}
|
||||
git tag -a v${R1} -m "${R1}"
|
||||
|
||||
# push the tag
|
||||
git push openlayers v3.1.0
|
||||
# push the tag
|
||||
git push openlayers v${R1}
|
||||
```
|
||||
|
||||
### Publish to npm
|
||||
|
||||
Run the `publish.sh` task with the version number as specified in the `package.json` (without the "v" prefix). The `publish.sh` script makes sure that the tag name and the version in `package.json` for that tag match. This implies you have an npm user account which has the correct permissions.
|
||||
|
||||
./tasks/publish.sh 3.1.0
|
||||
```
|
||||
./tasks/publish.sh ${R1}
|
||||
```
|
||||
|
||||
### Bump the patch version number
|
||||
|
||||
This is to allow users to update to ol@dev seamlessly. Check out the release branch again:
|
||||
|
||||
git checkout release-v3.1.0
|
||||
```
|
||||
git checkout release-v${R1}
|
||||
```
|
||||
|
||||
Edit `package.json` and bump the patch version number, e.g.
|
||||
```json
|
||||
{
|
||||
"name": "openlayers",
|
||||
"version": "3.1.1-dev"
|
||||
}
|
||||
|
||||
```
|
||||
# mac flavor sed
|
||||
sed -i '' "s/${R1}/${R2}-dev/" package.json
|
||||
```
|
||||
|
||||
Propagate this change to `package-lock.json`:
|
||||
|
||||
npm install
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
Commit and push this change:
|
||||
|
||||
git add package.json package-lock.json
|
||||
git commit -m "Develop on 3.1.1-dev"
|
||||
```
|
||||
git add package.json package-lock.json
|
||||
git commit -m "Develop on ${R2}-dev"
|
||||
```
|
||||
|
||||
### Merge the release branch
|
||||
|
||||
Push the pending changes to the release branch
|
||||
|
||||
git push openlayers release-v3.1.0
|
||||
```
|
||||
git push openlayers release-v${R1}
|
||||
```
|
||||
|
||||
Give the pull request for the release branch a final review, and merge it into `main`.
|
||||
|
||||
@@ -98,27 +124,42 @@ Give the pull request for the release branch a final review, and merge it into `
|
||||
You need a local clone of the [openlayers.github.io](https://github.com/openlayers/openlayers.github.io) repo, with the `build` branch checked out.
|
||||
|
||||
First of all make sure your `build` branch is up to date. Note that the deploy step requires that the remote is named `origin`.
|
||||
|
||||
git checkout build
|
||||
git fetch origin
|
||||
git reset --hard origin/build
|
||||
|
||||
Edit the `package.json` page to include the version number for the latest release (e.g. `"version": "3.1.0"`). Commit and push the change:
|
||||
```
|
||||
git checkout build
|
||||
git fetch origin
|
||||
git reset --hard origin/build
|
||||
```
|
||||
|
||||
# update package-lock.json and dependencies
|
||||
npm install
|
||||
Edit the `package.json` page to include the version number for the latest release.
|
||||
|
||||
# commit the change
|
||||
git add package.json package-lock.json
|
||||
git commit -m 'Updating for v3.1.0'
|
||||
```
|
||||
# mac flavor sed
|
||||
sed -i '' "s/${R0}/${R1}/" package.json
|
||||
```
|
||||
|
||||
# push to GitHub
|
||||
git push origin build
|
||||
Update package-lock.json and dependencies.
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
Commit and push the change:
|
||||
```
|
||||
# commit the change
|
||||
git add package.json package-lock.json
|
||||
git commit -m "Updates for v${R1}"
|
||||
|
||||
# push to GitHub
|
||||
git push origin build
|
||||
```
|
||||
|
||||
Publish the release artifacts (examples and source) on the website. In a working copy of the openlayers/openlayers.github.io:
|
||||
|
||||
# publish
|
||||
treeish=latest npm run deploy
|
||||
```
|
||||
# publish
|
||||
treeish=latest npm run deploy
|
||||
```
|
||||
|
||||
(Note that the `latest` alias above will deploy the version specified in `package.json`.)
|
||||
|
||||
@@ -128,11 +169,13 @@ If you run into ```Warning: ENFILE: file table overflow``` check out this [Stack
|
||||
|
||||
Create an archive from the artifacts created by the `npm run deploy` step above. This includes the documentation and source.
|
||||
|
||||
treeish=latest npm run zip
|
||||
```
|
||||
treeish=latest npm run zip
|
||||
```
|
||||
|
||||
Note: we do not rely on the archive created by GitHub because it only contains the source code. Our archive includes the ol builds, the hosted examples, the generated API docs, etc.
|
||||
|
||||
Edit the GitHub release page for the tag to include the Markdown from the changelog created above.
|
||||
Draft a [new release](https://github.com/openlayers/openlayers/releases/new) with the latest tag. Edit the GitHub release page for the tag to include the Markdown from the changelog created above.
|
||||
|
||||
Attach the `.zip` archive created above to the release page.
|
||||
|
||||
@@ -144,7 +187,7 @@ Move all open issues that are in the current milestone to the next one if needed
|
||||
|
||||
Tweet with the openlayers account, something like:
|
||||
```
|
||||
OpenLayers v3.12.0 is out! Thanks to everyone who contributed. https://github.com/openlayers/openlayers/releases/tag/v3.1.0
|
||||
OpenLayers v${R1} is out! Thanks to everyone who contributed. https://github.com/openlayers/openlayers/releases/tag/v${R1}
|
||||
```
|
||||
|
||||
### Patch releases
|
||||
|
||||
Reference in New Issue
Block a user