Skip to content

Latest commit

 

History

History
169 lines (124 loc) · 5.33 KB

File metadata and controls

169 lines (124 loc) · 5.33 KB

Rapid Release Checklist

To update translations

Create a file transifex.auth in the root folder of the Rapid project. This file should contain your API bearer token, for example:

 { "token": "1/f306870b35f5182b5c2ef80aa4fd797196819cb132409" }

See: https://developers.transifex.com/reference/api-authentication for information on generating an API bearer token. (This file is .gitignored)

Update main branch

The main branch includes all the code, but we don't check in the built assets to git. (Many of the files in /dist are in .gitignore)

# Make sure your main branch is up to date and all tests pass
git checkout main
git pull origin
bun install
bun run test

# Pick a version, see https://semver.org/ - for example: 'A.B.C' or 'A.B.C-pre.D'
#  - We do this step first because the files in `/dist` will include this version in their metadata
#  - Update `CHANGELOG.md`
#  - Set release version number in `modules/core/context.js` and `package.json`

# Store in environment variable for later (replace below with the actual version)
export VERSION=rapid-A.B.C-pre.D
npm run build
git add . && git commit -m  "$VERSION"

# Update imagery
rm -rf bun.lock node_modules/editor-layer-index/
bun install
bun run imagery
bun run build
git add . && git commit -m 'bun run imagery'

# Update translations
# Note!! We need `node` for this currently, as of bun v1.3.
# This script should be able to run under `bun`, but there is a bug which causes
# `bun` to exit early.  I have not been able determine the cause or reproduce.
# My best guess is that the Transifex code relies on `axios` to do the data fetching,
# and there a handful of open `bun` issues with `axios`.
# We could work around this by using the command line `tx` tool to get the files instead.
# bun run translations
node --experimental-strip-types ./scripts/tx_pull.ts
bun run build
git add . && git commit -m 'bun run translations'

# Update main branch
git push origin main

Update release branch

The release branch checks in the contents of /dist too, this makes it suitable for deployment. It's basically a copy of main but with one additional commit appended to it. This will also be the commit that we tag and publish. (We use -f to force check-in all the files in /dist)

git checkout release
git reset --hard main
bun run all
git add -f dist
git commit -m 'Check in build'
git push origin -f release

Sanity checks

Dry run

Confirm that publish will work, and that it won't be >150 MB. If it is too large, the JSDelivr CDN will not serve it. See Rapid#1561

bun publish --dry-run

Typically you should see something like this:

npm notice package size: 24.5 MB
npm notice unpacked size: 94.8 MB

(someday: can we automate this check?)

Tag and Publish

The point of no return, tag and publish:

git tag "$VERSION"
git push origin "$VERSION"
bun publish

Set as latest release on GitHub:

Deploys

Rapid is set up to do deploys automatically from a GitHub Action (see above). (We use AWS web console to promote a release to rapideditor.org/rapid or other URLs.)

You can also manually deploy Rapid someplace just by copying the /dist folder, for example:

git checkout release
aws s3 cp dist <destination>

Purge cache

curl 'https://purge.jsdelivr.net/npm/@rapideditor/rapid/dist/rapid.css'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/rapid/dist/rapid.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/rapid/dist/rapid.min.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/[email protected]/dist/rapid.css'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/[email protected]/dist/rapid.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/[email protected]/dist/rapid.min.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.css'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.js'
curl 'https://purge.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.min.js'

Update rapid-standalone

See https://github.com/rapideditor/rapid-standalone After publishing a new version of Rapid, you should also refresh and publish a new version of that project too.

Notify Partners

Notify anyone who uses Rapid that there is a new release. This section is to keep track of those.

OpenStreetMap Communities

MapRoulette

https://github.com/maproulette/maproulette3

HOT Tasking Manager

https://github.com/hotosm/tasking-manager