UNPKG

2.38 kBMarkdownView Raw
1
2# Pushing a New Version
3
4Nunjucks attempts to adhere to semantic versioning. The API is very stable, so
5from here on out it will most likely be point releases.
6
71. Do a `pull` from github to make sure you have all the latest updates.
8
92. View all the changes since the last version:
10
11 ```
12 $ git log --oneline v1.2.3..master
13 ```
14
15Replace `v1.2.3` with whatever the last version was, and you'll see all the
16changes going out in this version. Ensure that all significant user-facing
17changes (new features and bugfixes) are mentioned in `CHANGELOG.md`. Change the
18"master (unreleased)" heading in `CHANGELOG.md` to the new version number and
19date.
20
213. Update the version in `package.json`.
22
233. Run the command to update the ready-made files for the browser.
24
25 ```
26 $ npm run browserfiles
27 ```
28
295. Commit above changes and push to `master` (or a release branch, if using one).
30
316. 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
357. Publish to npm:
36
37 ```
38 npm publish
39 ```
40
418. 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
619. Add a new "master (unreleased)" section at the top of `CHANGELOG.md`.
62
6310. 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