Skip to content

Latest commit

 

History

History
161 lines (116 loc) · 4.83 KB

RELEASING.md

File metadata and controls

161 lines (116 loc) · 4.83 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
npm 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 package-lock.json node_modules/editor-layer-index/
npm install
npm run imagery
npm run build
git add . && git commit -m 'npm run imagery'

# Update translations
npm run translations
npm run build
git add . && git commit -m 'npm 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
npm 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

npm 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"
npm 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