-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Automate more of the release process
- Loading branch information
Showing
6 changed files
with
187 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,125 +15,97 @@ QUnit aims for its releases to be reproducible. Recent releases are automaticall | |
> | ||
> System prerequisites: | ||
> | ||
> * Node.js 12, or later. | ||
> * Node.js 14, or later. | ||
> * Git 2.11, or later. | ||
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. | ||
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. | ||
|
||
2. Create a local `release` branch, and ensure it is up-to-date: | ||
* Verify that the canonical repository is cloned (not a fork): | ||
1. Create a local `release` branch, and ensure it is up-to-date: | ||
Verify that the canonical repository is cloned (not a fork): | ||
``` | ||
git remote -v | ||
# … | ||
# origin [email protected]:qunitjs/qunit.git | ||
``` | ||
* Create or reset the `release` branch: | ||
Create or reset the `release` branch: | ||
``` | ||
git remote update && git checkout -B release -t origin/main | ||
``` | ||
|
||
3. Install dev dependencies and run the tests: | ||
2. Install dev dependencies: | ||
``` | ||
npm ci && npm test | ||
npm ci | ||
``` | ||
Run the tests in various real browsers, either locally or via [BrowserStack](https://www.browserstack.com/): | ||
``` | ||
python3 -m http.server 4000 | ||
# or: | ||
# php -S localhost:4000 | ||
|
||
open http://localhost:4000/test/ | ||
3. Create the release preparation commit: | ||
``` | ||
node build/prep-release.js @VERSION | ||
``` | ||
|
||
4. Create and push the release preparation commit: | ||
* Use `git add -p` to review the changes. | ||
* 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. | ||
* Edit `History.md` to remove changes not relevant to end-users (e.g. changes relating to tests, build, internal refactoring, doc fixes, etc.). | ||
|
||
Commit your changes with the following message (replace `@VERSION` with the release version): | ||
``` | ||
Build: Prepare @VERSION release | ||
``` | ||
|
||
1. Update the package.json and AUTHORS.txt files, by running the below command (replace `@VERSION` with the release version): | ||
``` | ||
node build/prep-release.js @VERSION | ||
``` | ||
* Use `git add -p` to review the changes. | ||
* 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. | ||
* Edit `History.md` to remove change not relevant to end-users (e.g. changes relating to tests, build, internal refactoring, doc fixes, etc.). | ||
2. Commit the above changes with the following message (replace `@VERSION` with the release version): | ||
``` | ||
Build: Prepare @VERSION release | ||
``` | ||
3. Push the `release` branch to GitHub. | ||
4. Create a pull request, and merge it once CI is passing. | ||
Push the `release` branch to GitHub. | ||
Once CI is passing, push again, this time to the (protected) `main` branch. | ||
|
||
## Performing the release | ||
|
||
5. Create a local `release` branch, and ensure it is up-to-date: | ||
* Run `git remote -v` and verify the following: | ||
``` | ||
origin [email protected]:qunitjs/qunit.git | ||
``` | ||
* Create or reset the `release` branch: | ||
``` | ||
git remote update && git checkout -B release -t origin/main | ||
``` | ||
* Verify that the latest commit is your release preparation commit: | ||
``` | ||
git show | ||
# Build: Prepare x.y.z release | ||
# … | ||
``` | ||
Verify that your local repo is at the release preparation commit: | ||
|
||
6. Make changes for the release commit: | ||
* Set the release version for npm and Bower metadata (replace `@VERSION` with the release version): | ||
``` | ||
node build/set-release.js @VERSION | ||
``` | ||
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. | ||
``` | ||
git show | ||
# Build: Prepare x.y.z release | ||
# … | ||
``` | ||
|
||
* Generate the release artifacts: | ||
4. Build the release: | ||
``` | ||
npm run build | ||
node build/build-release.js @VERSION | ||
``` | ||
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. | ||
|
||
* Review the changes to the package and library files, compared to the previous release. | ||
Review the release artifacts, compared to the previous release. | ||
``` | ||
node build/review-package.js @LAST_VERSION | ||
# … reviews package.json, qunit.js, and qunit.css | ||
``` | ||
|
||
7. Commit and publish the release to GitHub.<br>⚠️ Do not push to the main branch! | ||
5. Publish to GitHub.<br>⚠️ Do not push to the main branch! | ||
``` | ||
git add -f package.json bower.json qunit/ | ||
git commit -m "Release @VERSION" | ||
git tag -s "@VERSION" -m "Release @VERSION" | ||
git push --tags | ||
``` | ||
|
||
8. Verify that Bower sees the release, by running `npx bower info qunit` and checking that the latest | ||
version is indeed the version we just published. | ||
9. Publish the release to npm: | ||
* Use `git status` to confirm once more that you have a clean working copy, apart from release artifacts in `qunit/`. | ||
* Run `npm publish`, this will bundle the current directory and publish it to npm with the name and version specified in `package.json`. | ||
* Verify that the release is displayed at <https://www.npmjs.com/package/qunit>. | ||
10. Publish the release to the jQuery CDN: | ||
* Prepare the commit locally: | ||
``` | ||
node build/auth-cdn-commit.js real @VERSION | ||
6. Publish to npm: | ||
``` | ||
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. | ||
* Review the commit and push it: | ||
npm publish | ||
```` | ||
This will bundle the current directory and publish it to npm with the name and version specified in `package.json`. | ||
Verify that the release is displayed at <https://www.npmjs.com/package/qunit>. | ||
7. Publish to the jQuery CDN: | ||
Review the commit and push it: | ||
``` | ||
cd __codeorigin | ||
git show | ||
# … | ||
git push | ||
``` | ||
* 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> | ||
Verify that the release is listed at <https://code.jquery.com/qunit/> and that you can open the JS/CSS files. | ||
## Updating the website | ||
After the release is published, we need to update the website. | ||
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: | ||
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: | ||
``` | ||
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 | |
You're almost there! Make sure you update [GitHub releases](https://github.com/qunitjs/qunit/releases) using the changelog from `History.md`. | ||
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. | ||
That's it! If you made it this far, congratulations you have successfully released a version of QUnit! | ||
_If anything in the above was inaccurate or unclear, improve it to mmake future releases easier!_ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.