- Make sure there are no unmerged PRs or unresolved critical bugs that should be part of the release
All changes should be squash-merged to develop at this point.
The commit description is the PR title. What makes a good Pull Request title?
- It should start with an identifier, i.e. [bugfix]
- It has meaningful text describing the code change
- If applicable, it references a ticket, i.e. (fixes #23)
- Run tests on sauce.
As of 2017.11.20, some of the Windows 7 tests and IE8 tests are flaky, we need to investigate.
grunt test:browser
grunt test:sauce-browser ## todo - this is not working right now!
git checkout .
git clean -f
Make sure you have a Saucelabs account, and get the open-source plan (you have to email them directly).
- Make sure tests pass inside momentjs.com, locally (using latest moment-timezone). Update moment-timezone if necessary.
Symlink [moment, moment-timezone] to [
libs/moment
,libs/moment-timezone
] of the momentjs.com repository.
cd libs/moment
git checkout origin/develop
npm install
grunt release
cd ../moment-timezone
git fetch origin
git checkout origin/master
cd ../..
grunt server
Make sure you check the moment tests and cursorily check the moment-timezone tests.
- Go through the commit history and make a changelog. Each item should have the PR that was merged, or at least a commit hash. Publish the changelog in a gist (like https://gist.github.com/ichernev/ac3899324a5fa6c8c9b4). Make sure breaking changes are highly visible.
We have a script to do this! Go to the root of your
moment
repository:
curl https://gist.githubusercontent.com/marwahaha/deb752493230f4785d32562d7aed8493/raw/ > moment-gist.py
python moment-gist.py 2.19.2 2.19.3
- Update momentjs.com -- add documentation about new features and deprecations. Use grunt server and develop on localhost. Make sure typings are updated with new functions/params.
When adding to docs,
tasks/fix-order.js
can fix the numberings for each section.
- Update
CHANGELOG.md
with a shorter summary of the changelog, and point to the gist. UpdateMoment.js.nuspec
<releaseNotes>
. Commit with messageUpdate changelog for 1.2.3
.
Before you commit, make sure you've removed changes from
grunt release
. Only commit those two changes.
- Bump version with grunt bump_version:1.2.3, commit
Bump version to 1.2.3
Double-check that the version changed in all places, including Meteor, Nuspec, and package.json
- Run grunt release to build all files that need building. Commit with message
Build 1.2.3
This is the last local step. If you push now, you have to finish the release process.
- Push develop (not yet released) moment github repo.
- Update moment reference in momentjs.com libs/moment, and make sure the references to the new version are working (on localhost)
- Check if the develop travis built is successful
- Merge develop into master, tag and push
git checkout master
git merge develop
git tag 2.19.2 -m 2.19.2
git push && git push --tags
- Pre-publish on NPM. This makes a fresh clone and whitelist to control what gets published.
./scripts/npm_prepublish.sh 1.2.3
cd ../moment-npm
npm publish
cd -
- Update momentjs.com moment dependency in package.json, commit and push, travis will deploy the website. (make sure it updates!)
- Nuget publish
grunt nuget-publish
(usually this doesn't work, so I also runnuget push Moment.js.2.19.2.nupkg -Source https://api.nuget.org/v3/index.json
, more info here) - Meteor publish
meteor login && cd meteor && meteor publish && cd -
- Advertise: tweet about the new release passing a link to the extended changelog (in the gist).
Also make sure the
package-lock.json
gets updated!