-
Notifications
You must be signed in to change notification settings - Fork 669
Release 4.2
Steps taken to release 4.2.1 on 2023-06-21. (Originally, I attempt to release 4.2.0, but I run into a hiccup near the end, and need to release 4.2.1 instead).
- Check that my local working copy is a clean clone of 0xfe/vexflow:
$ git remote -v
origin git@github.com:0xfe/vexflow.git (fetch)
origin git@github.com:0xfe/vexflow.git (push)
- Check that my local working copy is on the
master
branch.
$ git branch
* master
git pull
- Check that the most recent commit hash matches the one on the github website:
$ git log -1
commit ee1e01d90db1ed5a6ecf3c46728c93d26285b26d (HEAD -> master, origin/master, origin/HEAD)
Author: Ron B. Yeh <xxxxx>
Date: Mon Jun 5 18:15:07 2023 -0700
Remove build/ after releasing version 4.2.0-rc.0 to npm and GitHub.
npm ci
...
1 critical severity vulnerability
To address all issues, run:
npm audit fix
Run `npm audit` for details.
npm audit fix
changed 1 package, and audited 1135 packages in 3s
215 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
- Let's try
npm ci
again:
added 897 packages, and audited 1135 packages in 41s
215 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-
git diff
to see what changed. Looks likevm2
updated from "3.9.17" to "3.9.19". git add package-lock.json
git commit -m "npm audit fix"
git push
grunt clean
grunt test
...
>> 2188 tests completed in 37305ms, with 0 failed, 0 skipped, and 0 todo.
Done.
-
On macOS, the
open
command can launch the default web browser when used on an HTML file or URL.open tests/flow.html
open tests/flow-headless-browser.html
open tests/flow-old-browser.html
-
For the latter two files, it looks like we are pointing to the QUnit JS/CSS files in the
node_modules/
folder. That one is buggy. Instead, we need to point to the patched version intests/qunit/
. -
Fix the QUnit bugs in:
tests/flow-headless-browser.html
tests/flow-old-browser.html
-
Make sure my GITHUB_TOKEN is up to date. I delete my old GITHUB_TOKEN, and create a new one by going to this link. I receive an email with this note:
A personal access token (classic) "release-it" with repo scope was recently added to your account.
-
I save my GITHUB_TOKEN environment variable in a super secret place :-) so I can provide it to the release script later. In the next command, replace XYZ with my actual personal access token, which looks something like:
ghp_ab1cd3efgh5ijkl6mnop97xy0z
-
First I do a dry-run:
grunt release:dry-run
. At the version select menu, chooseminor (4.2.0)
. -
Looks OK! Let's do the real thing!
-
Launch my 2FA app for logging into npm.
-
grunt release
? Select increment (next version): minor (4.2.0)
......... lots of output here .........
- Answer the Questions:
? Publish vexflow to npm? Yes
? Please enter OTP for npm: 123456789
? Commit (Release VexFlow 4.2.0)? Yes
? Tag (4.2.0)? Yes
? Push? Yes
- WHOOPS... the PUSH FAILED!!! Argh.... I might have run the release script from the wrong working folder. This is because I got distracted while checking my GITHUB_TOKEN environment variable. I closed my terminal tab, and then reopened a new terminal tab to the wrong folder. Ugh.... silly me.
- I might have to do this again, and publish a 4.2.1.....
- OK, I fix the state of my local working copy to match the remote repository. I deleted the 4.2.0 tags from both local and remote repositories.
grunt
-
open tests/flow.html
to check some visual tests. My cursory inspection says that everything looks OK. ;-) - Let's release it!
grunt clean
-
grunt release
- I choose a custom version:
4.2.1
because npm already has a4.2.0
.
- I choose a custom version:
...
...
...
? Publish vexflow to npm? Yes
? Please enter OTP for npm: 9876654322
? Commit (Release VexFlow 4.2.1)? Yes
? Tag (4.2.1)? Yes
? Push? Yes
? Create a release on GitHub (4.2.1)? Yes
$ grunt v309:remove
Running "v309:remove" (v309) task
rm 'releases/vexflow-min.js'
rm 'releases/vexflow-debug.js'
Done.
$ echo Successfully released vexflow 4.2.1 to https://github.com/0xfe/vexflow
Successfully released vexflow 4.2.1 to https://github.com/0xfe/vexflow
🔗 https://www.npmjs.com/package/vexflow
🔗 https://github.com/0xfe/vexflow/releases/tag/4.2.1
🏁 Done (in 154s.)
Removing build/ folder...
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 269 bytes | 269.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:0xfe/vexflow.git
8904473e..19ddc353 master -> master
Done.
[ VexFlow.com ] [ API ] [ GitHub Repo ] [ Contributors ]