1 |
|
2 | # Pushing a New Version
|
3 |
|
4 | Nunjucks attempts to adhere to semantic versioning. The API is very stable, so
|
5 | from here on out it will most likely be point releases.
|
6 |
|
7 | 1. Do a `pull` from github to make sure you have all the latest updates.
|
8 |
|
9 | 2. View all the changes since the last version:
|
10 |
|
11 | ```
|
12 | $ git log --oneline v1.2.3..master
|
13 | ```
|
14 |
|
15 | Replace `v1.2.3` with whatever the last version was, and you'll see all the
|
16 | changes going out in this version. Ensure that all significant user-facing
|
17 | changes (new features and bugfixes) are mentioned in `CHANGELOG.md`. Change the
|
18 | "master (unreleased)" heading in `CHANGELOG.md` to the new version number and
|
19 | date.
|
20 |
|
21 | 3. Update the version in `package.json`.
|
22 |
|
23 | 3. Run the command to update the ready-made files for the browser.
|
24 |
|
25 | ```
|
26 | $ npm run browserfiles
|
27 | ```
|
28 |
|
29 | 5. Commit above changes and push to `master` (or a release branch, if using one).
|
30 |
|
31 | 6. Draft a new release on GitHub and copy the changelog to the description. The
|
32 | tag and title should both be the version, in the form `v2.3.0`. Publish the
|
33 | release.
|
34 |
|
35 | 7. Publish to npm:
|
36 |
|
37 | ```
|
38 | npm publish
|
39 | ```
|
40 |
|
41 | 8. Make sure docs are up-to-date. You need to copy all the `nunjucks*.js` files
|
42 | in `browser/` to the docs. This is where the "download" link points to in
|
43 | the docs. You also need to copy the tests into the docs, for the online
|
44 | browser tests. ``make prod`` in the ``docs/`` dir will handle these tasks
|
45 | for you. Push (force push if necessary) the build out _site folder onto the
|
46 | `gh-pages` branch of the `nunjucks` repo to get it live. One way to do that
|
47 | is the following commands. These commands presume that you have another
|
48 | nunjucks git clone inside the (git-ignored) `docs/_site` directory, checked
|
49 | out to the `gh-pages` branch (and tracking `origin/gh-pages`). (To set that
|
50 | up the first time, `cd docs/_site`, `rm -rf *`, `git clone
|
51 | git@github.com:mozilla/nunjucks.git .`, and `git checkout gh-pages`).
|
52 |
|
53 | ```
|
54 | cd docs && make prod
|
55 | cd files
|
56 | python -m SimpleHTTPServer
|
57 | # load http://localhost:8000/tests/browser/ and verify tests pass in browser
|
58 | cd ../_site && git add -A && git commit && git push
|
59 | ```
|
60 |
|
61 | 9. Add a new "master (unreleased)" section at the top of `CHANGELOG.md`.
|
62 |
|
63 | 10. Bump the version number in `package.json` to a development pre-release of
|
64 | the next anticipated release number (e.g. "2.2.0-dev.1").
|
65 |
|
\ | No newline at end of file |