Skip to content

Commit 230fc40

Browse files
committed
Docs: Automate more of the release process
1 parent 552ad59 commit 230fc40

File tree

6 files changed

+187
-212
lines changed

6 files changed

+187
-212
lines changed

RELEASE.md

Lines changed: 41 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -15,125 +15,97 @@ QUnit aims for its releases to be reproducible. Recent releases are automaticall
1515
>
1616
> System prerequisites:
1717
>
18-
> * Node.js 12, or later.
18+
> * Node.js 14, or later.
1919
> * Git 2.11, or later.
2020
21-
1. Ensure that all changes for this release have been merged into the main branch. For patch releases, try landing any other bug fixes; for minor releases, ensure new features have been documented and tested. Major releases likely have their own checklist.
21+
Ensure that all changes for this release have been merged into the main branch. For patch releases, try landing any other bug fixes; for minor releases, ensure new features have been documented and tested. Major releases likely have their own checklist.
2222

23-
2. Create a local `release` branch, and ensure it is up-to-date:
24-
* Verify that the canonical repository is cloned (not a fork):
23+
1. Create a local `release` branch, and ensure it is up-to-date:
24+
Verify that the canonical repository is cloned (not a fork):
2525
```
2626
git remote -v
2727
# …
2828
# origin [email protected]:qunitjs/qunit.git
2929
```
30-
* Create or reset the `release` branch:
30+
Create or reset the `release` branch:
3131
```
3232
git remote update && git checkout -B release -t origin/main
3333
```
3434

35-
3. Install dev dependencies and run the tests:
35+
2. Install dev dependencies:
3636
```
37-
npm ci && npm test
37+
npm ci
3838
```
39-
Run the tests in various real browsers, either locally or via [BrowserStack](https://www.browserstack.com/):
40-
```
41-
python3 -m http.server 4000
42-
# or:
43-
# php -S localhost:4000
4439

45-
open http://localhost:4000/test/
40+
3. Create the release preparation commit:
41+
```
42+
node build/prep-release.js @VERSION
4643
```
4744

48-
4. Create and push the release preparation commit:
45+
* Use `git add -p` to review the changes.
46+
* In `AUTHORS.txt`, if you see duplicate entries, then use the `.mailmap` file to normalize them to a canonical name and e-mail address, and then re-run the above command.
47+
* Edit `History.md` to remove changes not relevant to end-users (e.g. changes relating to tests, build, internal refactoring, doc fixes, etc.).
48+
49+
Commit your changes with the following message (replace `@VERSION` with the release version):
50+
```
51+
Build: Prepare @VERSION release
52+
```
4953

50-
1. Update the package.json and AUTHORS.txt files, by running the below command (replace `@VERSION` with the release version):
51-
```
52-
node build/prep-release.js @VERSION
53-
```
54-
* Use `git add -p` to review the changes.
55-
* In `AUTHORS.txt`, if you see duplicate entries, then use the `.mailmap` file to normalize them to a canonical name and e-mail address, and then re-run the above command.
56-
* Edit `History.md` to remove change not relevant to end-users (e.g. changes relating to tests, build, internal refactoring, doc fixes, etc.).
57-
2. Commit the above changes with the following message (replace `@VERSION` with the release version):
58-
```
59-
Build: Prepare @VERSION release
60-
```
61-
3. Push the `release` branch to GitHub.
62-
4. Create a pull request, and merge it once CI is passing.
54+
Push the `release` branch to GitHub.
55+
Once CI is passing, push again, this time to the (protected) `main` branch.
6356

6457
## Performing the release
6558

66-
5. Create a local `release` branch, and ensure it is up-to-date:
67-
* Run `git remote -v` and verify the following:
68-
```
69-
origin [email protected]:qunitjs/qunit.git
70-
```
71-
* Create or reset the `release` branch:
72-
```
73-
git remote update && git checkout -B release -t origin/main
74-
```
75-
* Verify that the latest commit is your release preparation commit:
76-
```
77-
git show
78-
# Build: Prepare x.y.z release
79-
#
80-
```
59+
Verify that your local repo is at the release preparation commit:
8160

82-
6. Make changes for the release commit:
83-
* Set the release version for npm and Bower metadata (replace `@VERSION` with the release version):
84-
```
85-
node build/set-release.js @VERSION
86-
```
87-
This script will edit `package.json` and `bower.json`. It does not need any credentials or permissions, apart from read-write in the project directory.
61+
```
62+
git show
63+
# Build: Prepare x.y.z release
64+
# …
65+
```
8866

89-
* Generate the release artifacts:
67+
4. Build the release:
9068
```
91-
npm run build
69+
node build/build-release.js @VERSION
9270
```
71+
This script does not need any credentials or permissions, and may be run in a container that can only read-write the current directory. This will edit `package.json` and `bower.json`, then execute `npm run build` to generate the release artifacts, then create a local clone of [jquery/codeorigin.jquery.com](https://github.com/jquery/codeorigin.jquery.com), and prepare a local commit for you to later push.
9372

94-
* Review the changes to the package and library files, compared to the previous release.
73+
Review the release artifacts, compared to the previous release.
9574
```
9675
node build/review-package.js @LAST_VERSION
9776
9877
# … reviews package.json, qunit.js, and qunit.css
9978
```
10079

101-
7. Commit and publish the release to GitHub.<br>⚠️ Do not push to the main branch!
80+
5. Publish to GitHub.<br>⚠️ Do not push to the main branch!
10281
```
10382
git add -f package.json bower.json qunit/
10483
git commit -m "Release @VERSION"
10584
git tag -s "@VERSION" -m "Release @VERSION"
10685
git push --tags
10786
```
10887

109-
8. Verify that Bower sees the release, by running `npx bower info qunit` and checking that the latest
110-
version is indeed the version we just published.
111-
112-
9. Publish the release to npm:
113-
* Use `git status` to confirm once more that you have a clean working copy, apart from release artifacts in `qunit/`.
114-
* Run `npm publish`, this will bundle the current directory and publish it to npm with the name and version specified in `package.json`.
115-
* Verify that the release is displayed at <https://www.npmjs.com/package/qunit>.
116-
117-
10. Publish the release to the jQuery CDN:
118-
* Prepare the commit locally:
119-
```
120-
node build/auth-cdn-commit.js real @VERSION
88+
6. Publish to npm:
12189
```
122-
This will clone [jquery/codeorigin.jquery.com](https://github.com/jquery/codeorigin.jquery.com), copy the `qunit/` release artifacts and rename them to `qunit-@VERSION`, and create a local commit.
123-
* Review the commit and push it:
90+
npm publish
91+
````
92+
This will bundle the current directory and publish it to npm with the name and version specified in `package.json`.
93+
Verify that the release is displayed at <https://www.npmjs.com/package/qunit>.
94+
95+
7. Publish to the jQuery CDN:
96+
Review the commit and push it:
12497
```
12598
cd __codeorigin
12699
git show
127-
#
128100
git push
129101
```
130-
* Verify that the release is listed at <https://code.jquery.com/qunit/> and accessible via <https://code.jquery.com/qunit/qunit-x.y.z.js>
102+
Verify that the release is listed at <https://code.jquery.com/qunit/> and that you can open the JS/CSS files.
131103
132104
## Updating the website
133105
134106
After the release is published, we need to update the website.
135107
136-
Check out the main branch of the [qunitjs/qunitjs.com](https://github.com/qunitjs/qunitjs.com) repository, and ensure it is clean and up-to-date. Update release links and demos to use the version we just released, using this script:
108+
Check out the main branch of the [qunitjs/qunitjs.com](https://github.com/qunitjs/qunitjs.com) repository, and ensure it is clean and up-to-date. Run the following script, which will update release links and demos to use the new version:
137109
138110
```
139111
qunitjs.com$ node build/set-version.js <version>
@@ -151,8 +123,6 @@ Push the commit, and check the website in a few minutes to verify the change ([d
151123
152124
You're almost there! Make sure you update [GitHub releases](https://github.com/qunitjs/qunit/releases) using the changelog from `History.md`.
153125
154-
Finally, make an announcement on the [@qunitjs](https://twitter.com/qunitjs) Twitter account. Mention highlights of the release if possible, andinclude a link to the release page.
155-
156126
That's it! If you made it this far, congratulations you have successfully released a version of QUnit!
157127
158128
_If anything in the above was inaccurate or unclear, improve it to mmake future releases easier!_

build/auth-cdn-commit.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)