Skip to content

Commit 2a6a672

Browse files
authored
Ensure release note is updated (#1050)
* Read description from package.json file * Ensure release description is provided * Update contribution instructions
1 parent f925986 commit 2a6a672

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The outline above is an extremely simplified version. In real life you have to d
3636

3737
- Please check to make sure that there aren't existing pull requests attempting to address the issue mentioned. We also recommend checking for issues related to the issue on the tracker, as a team member may be working on the issue in a branch or fork.
3838
- Non-trivial changes should be discussed in an issue first
39-
- Develop in a topic branch, not master
39+
- Develop in a topic branch, not main
4040
- Lint the code by `yarn lint`
4141
- Add relevant tests to cover the change
4242
- Make sure test-suite passes: `yarn test`
@@ -46,14 +46,11 @@ The outline above is an extremely simplified version. In real life you have to d
4646

4747
## Release Checklist
4848

49-
- Update the version number in [packages/core/package.json](https://github.com/OctoLinker/OctoLinker/blob/master/packages/core/package.json) and [assets/manifest.json](https://github.com/OctoLinker/OctoLinker/blob/master/assets/manifest.json). Use `minor` or `major` instead of `patch` if needed (see [semver.org](http://semver.org/) for details).
49+
- Run `npm version <patch|minor|major>` to update the version number in [packages/core/package.json](https://github.com/OctoLinker/OctoLinker/blob/main/packages/core/package.json) and [assets/manifest.json](https://github.com/OctoLinker/OctoLinker/blob/main/assets/manifest.json). Use `minor` or `major` instead of `patch` if needed (see [semver.org](http://semver.org/) for details).
5050
Consider that non-`patch` releases will cause users to receive update notifications, so lean towards a `patch` release for platform-specific stuff.
51-
See [lib/notification.js](https://github.com/OctoLinker/OctoLinker/blob/030859292f7ea4e8a3852a876707c22a6fe74d9a/lib/notification.js#L4).
5251
- Open a [pull request](https://github.com/OctoLinker/OctoLinker/pulls) with the new version.
5352
- Once the pull request is merged in, tag the resulting commit as `vX.Y.Z` (where `X`, `Y`, `Z` are the major, minor, and patch versions).
54-
- Push the tag to GitHub. This will trigger Travis CI to create a new [GitHub Release](https://github.com/OctoLinker/OctoLinker/releases) and submit the new Chrome extension to the Chrome Web Store. See [.travis.yml](https://github.com/OctoLinker/OctoLinker/blob/master/.travis.yml) for details.
55-
- Submit `firefox-octolinker-X.Y.Z.zip` from the [GitHub Release](https://github.com/OctoLinker/OctoLinker/releases) to [addons.mozilla.org](https://addons.mozilla.org/en-US/developers/addon/octolinker/versions#version-upload). Be sure to include the `Source code (zip)` file from the release as well.
53+
- Push the tag to GitHub. This will trigger a GitHub Action to create a new [GitHub Release](https://github.com/OctoLinker/OctoLinker/releases). This is uploading a new extension version to the Chrome Web Store and Mozilla Add-On Store. See [release.yml](https://github.com/OctoLinker/OctoLinker/blob/main/.github/workflows/release.yml) workflow for details.
54+
- Submit
5655
- Submit `opera-octolinker-X.Y.Z.zip` from the [GitHub Release](https://github.com/OctoLinker/OctoLinker/releases) to [addons.opera.com](https://addons.opera.com/developer/package/226344/?tab=versions). Afterwards, go to the [Conversation tab](https://addons.opera.com/developer/package/226344/?tab=conversation), add a link to the `Source code (zip)` file and copy/paste the build instructions from previous releases.
57-
- Update release notes at https://github.com/OctoLinker/OctoLinker/releases/tag/vX.Y.Z. You can find a list of changes since the previous release at https://github.com/OctoLinker/OctoLinker/compare/vA.B.C...vX.Y.Z, where `A.B.C` is the previous version number.
58-
Consider that non-`patch` releases will cause users to receive update notifications showing the first line of the release notes.
59-
See [lib/notification.js](https://github.com/OctoLinker/OctoLinker/blob/030859292f7ea4e8a3852a876707c22a6fe74d9a/lib/notification.js#L4).
56+
- Update release notes at https://github.com/OctoLinker/OctoLinker/releases/tag/vX.Y.Z. You can find a list of changes since the previous release at https://github.com/OctoLinker/OctoLinker/compare/vA.B.C...vX.Y.Z, where `A.B.C` is the previous version number.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test": "jest",
1111
"e2e": "node ./e2e/generate-fixtures-json.js && jest --config=e2e/jest-e2e.config.js",
1212
"test:watch": "jest --watch",
13-
"version": "dot-json assets/manifest.json version $npm_package_version && dot-json packages/core/package.json version $npm_package_version && git add assets/manifest.json packages/core/package.json",
13+
"version": "./scripts/version.sh",
1414
"release:cws": "cd dist && webstore upload --auto-publish",
1515
"release:amo": "cd dist && web-ext-submit",
1616
"release": "yarn release:cws && yarn release:amo",

packages/core/notification.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import * as storage from '@octolinker/helper-settings';
22
import { showNotification } from '@octolinker/user-interface';
33

44
let notificationEl;
5-
const releaseDescription =
6-
'More GitHub Actions support and better OctoLinker notifications';
7-
const { version } = require('./package.json');
5+
const { version, releaseDescription } = require('./package.json');
86

97
const displayVersion = version.replace('v', '');
108
const majorMinor = version.split('.').slice(0, -1).join('.');

packages/core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"repository": "https://github.com/octolinker/octolinker/tree/master/packages/core",
66
"license": "MIT",
77
"main": "./index.js",
8+
"releaseDescription": "More GitHub Actions support and better OctoLinker notifications",
89
"dependencies": {
910
"@octolinker/blob-reader": "1.0.0",
1011
"@octolinker/helper-github-api": "1.0.0",

scripts/version.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "Please summarize this release in one sentence"
4+
5+
read note
6+
7+
dot-json assets/manifest.json version $npm_package_version
8+
dot-json packages/core/package.json version $npm_package_version
9+
dot-json packages/core/package.json releaseDescription $note
10+
git add assets/manifest.json packages/core/package.json

0 commit comments

Comments
 (0)