Before doing the release, make sure that the project is in good state:
- Triage issues – make sure that all issues are labelled.
- Check for release-blocking bugs. All bugs which results in a wrong result of the evaluation are release-blocking.
- Go through the open PRs – consider merging any outstanding ones. Do not merge big changes right before the release.
- Sync google/go-jsonnet and google/jsonnet
- Check out master from both
- Check go-jsonnet/cpp-jsonnet submodule is HEAD of jsonnet tree, if not:
- Inside cpp-jsonnet:
git checkout master
git pull
cd ..
git checkout -b release
- Update the standard library:
go run cmd/dumpstdlibast/dumpstdlibast.go cpp-jsonnet/stdlib/std.jsonnet > astgen/stdast.go
./tests.sh
- Fix any failing tests.
- Send a PR with the updated version, so that all the CI tests are run
- Check that CI is green.
- Make sure that the project can be built and the tests pass using all build systems.
- C++:
make test
bazel test ...:all
mkdir build ; cd build ; cmake .. ; make ; make test
- Go:
./tests.sh
bazel test //:go_default_test
- C++:
- Make sure the Python bindings work (build and run tests locally).
- Go through the commits since the last release and prepare the release notes.
- The release notes should have separate sections for the language changes and changes specific to each implementation.
- Make sure that the stdlib documentation is complete. Check the release notes for any additions or changes to stdlib and make sure they are reflected in the documentation.
- Make sure that you can build the website locally.
- Download or build libjsonnet.wasm (see README.md for instructions)
jekyll serve -s doc/
(you need Jekyll 4.3.0 or later) to serve the site locally to check it.- Check that it works in two different browsers. Make sure that live evaluation in the tutorial works.
All the above points apply to both google/jsonnet and google/go-jsonnet.
A this point you should be confident that the project is ready for the release. Some of subsequent steps leave project are hard to reverse and/or leave the project in an inconsistent state, so proceed only if you have time to complete the release process in one sitting and fix any unexpected problems.
- Modify
include/libjsonnet.h
to bump the version number but add-pre1
suffix. - Update
test_cmd
golden file version numbers:
./tools/scripts/replace_test_cmd_version.sh <NEW_VERSION>-pre1
- Upload and test the pre-release Python package.
python setup.py build sdist
twine upload dist/whatever.tar.gz
(Needs credentials on pypi)- ON ANOTHER MACHINE AND CHECK THAT THE VERSION IS CORRECT AND IT ACTUALLY IS BUILDING THINGS IN THE LOG:
sudo pip install jsonnet --pre --upgrade
python
import _jsonnet
_jsonnet.evaluate_snippet('foo', '1+1')
- Remove -pre from version in
include/libjsonnet.h
. - Update version in
cpp/CMakeLists.txt
. - Update
test_cmd
golden file version numbers:
./tools/scripts/replace_test_cmd_version.sh <NEW_VERSION>
- In
doc/_stdlib_gen/stdlib-content.jsonnet
replace anyavailableSince: "upcoming"
with NEW_VERSION". - Send a PR and wait for CI to be green before merging.
- Create a release on Github. Put the previously prepared release notes there.
- Upload the Python package.
python setup.py build sdist
twine upload dist/whatever.tar.gz
(the version without the -pre)
- Sync with the (freshly-released) C++ version.
- At this point the C++ tests will not pass due to a different version in test_cmd tests.
- Modify
vm.go
to bump the version number, but add-pre1
suffix. - Upload and test the pre-release Python package.
python setup.py build sdist
twine upload dist/whatever.tar.gz
(Needs credentials on pypi)- ON ANOTHER MACHINE AND CHECK THAT THE VERSION IS CORRECT AND IT ACTUALLY IS BUILDING THINGS IN THE LOG:
sudo pip install gojsonnet --pre --upgrade
python
import _gojsonnet
_gojsonnet.evaluate_snippet('foo', '1+1')
- Remove the
-pre1
from version invm.go
. Now the tests should pass again. - Send a PR and wait for CI to be green before merging.
- Create a release on Github. Link to the C++ release in the description.
- Upload the Python package.
python setup.py build sdist
twine upload dist/whatever.tar.gz
(the version without the -pre)
In google/jsonnet:
- Build or download libjsonnet.wasm (see README.md)
jekyll serve -s docs/
- Check that the local version works in two different browsers. Make sure that live evaluation in the tutorial works.
tools/scripts/push_docs.sh
- Check that the public works in two different browsers. Make sure that you are getting the new version (and not an old cached version). Make sure that live evaluation in the tutorial works.
- Send an email to the mailing list.
- Announce the new release on Slack.
It's a good time to merge big PRs.