This makes a few changes to try to smooth over the process: 1. Updates changelog commands to filter out `refactor` commits. 2. Tweaks the changelog command to generate a markdown list for easy copy-pasting. 3. Links directly to the store pages to cut down on clicks. 4. Moves the source code section a bove the reviewer note and changelog, to match the ordering of the Firefox Add Ons form. PR Close #61883
5.6 KiB
Publish Angular DevTools
Publishing Angular DevTools is achieved through the following steps:
0. Check if there's anything to release
On the main branch, run:
git log "HEAD...$(git log HEAD~1 --grep="release:.*Angular DevTools" --format=format:%H | head -n 1)~1" --format=format:%s |
grep "(devtools):\|release:.*Angular DevTools" --color=never |
grep -v "^refactor" --color=never
If this displays any commits since the most recent release commit, then there's something to publish. If it only shows the most recent release commit, then the DevTools release can be skipped.
1. Sync workspace
Before starting anything, make sure your workspace is up to date with latest changes and dependencies.
git checkout main
git pull upstream main
nvm install
yarn --immutable
2. Update extension version numbers
Bump the version numbers listed in
manifest.chrome.json
and manifest.firefox.json.
3. Commit and merge
Commit the version bump:
git checkout -b devtools-release
git add . && git commit -m "release: bump Angular DevTools version to ${VERSION}"
git push -u origin devtools-release
Then create and merge a PR targeting patch with this change. Merging this PR does not
have any automation associated with it and can be merged at any time.
Once the PR is merged, pull and check out that specific commit hash on main and reinstall
dependencies as they might have changed.
git fetch upstream main
git checkout "${MERGED_RELEASE_COMMIT}"
nvm install
yarn --immutable
Note that while the steps below can technically be done without merging the release PR or checking out the merged commit, doing so is useful for release stability (actually releasing what the commit history says we are) and is necessary for accurate changelog generation.
4. Publish to Chrome Chrome
First, make sure you have access to publish the extension by ensuring you are part of the relevant Google Group.
Next, build and package the extension:
# Build the Chrome version.
yarn devtools:build:chrome
# Package the extension.
(cd dist/bin/devtools/projects/shell-browser/src/prodapp && zip -r ~/devtools-chrome.zip *)
Then, go to the
Angular DevTools Chrome Web Store page
and upload ~/devtools-chrome.zip.
You can choose to either publish immediately or only get approval but hold to publish at a later time. Note that even publishing immediately still requires approval from Chrome Web Store before it is available to users. Historically this has been pretty quick (< 30 minutes), but there is no hard upper limit on how long a review might take: https://developer.chrome.com/docs/webstore/review-process#review-time.
5. Publish to Firefox
To publish Angular DevTools as a Firefox Add-on, first build and package the extension:
# Build the Firefox version.
yarn devtools:build:firefox
# Package the extension.
(cd dist/bin/devtools/projects/shell-browser/src/prodapp && zip -r ~/devtools-firefox.zip *)
Then, go to the Angular DevTools Firefox Addons page and log in using the email and password from Valentine. This will require a two-factor code, which you can generate by installing Google Authenticator and scanning the QR code linked from Valentine.
Upload ~/devtools-firefox.zip as a new version. The Firefox publishing process is slightly more
involved than Chrome.
Source Code
Mozilla requires extension source code with instructions to build and run it. Since DevTools
exists in a monorepo with critical build tooling existing outside the devtools/ directory, we
need to upload the entire monorepo. Package it without dependencies and generated files with the
following command and upload it.
rm -rf dist/ **/node_modules/ && zip -r ~/angular-source.zip * -x ".git/*" -x "node_modules/*"
Changelog
Mozilla asks for a changelog, which needs to be authored manually. You can generate the changelog with the following command:
git log "HEAD~1...$(git log HEAD~1 --grep="release:.*Angular DevTools" --format=format:%H | head -n 1)" --format=format:%s |
grep "(devtools):" --color=never |
grep -v "^refactor" --color=never |
sed "s,^,* ,g" |
sed -E "s,\(#([0-9]+)\),([#\1](https://github.com/angular/angular/pull/\1/)),g"
Reviewer Note
There is a field to provide a note to the reviewer, copy this template and make sure to replace
${RELEASE_COMMIT} with the SHA of the release commit to create a valid link.
This is a monorepo and includes much more code than just the DevTools extension. The relevant code is under `devtools/...` and `devtools/README.md` contains instructions for compiling release builds locally.
The uploaded source is equivalent to https://github.com/angular/angular/tree/${RELEASE_COMMIT}/.
Similar to Chrome, we need to wait for approval from Mozilla before the extension is released. There's no hard upper-bound on this, but historically it typically takes at least a week.
Once the new DevTools version is in-review for both Chrome and Firefox, the release process is complete.