@@ -95,57 +95,82 @@ Ubuntu 16.04.
95950 . Branch and tag a new release. Tag the release version:
9696
9797 ``` shell
98- # Produces most recent tag (e.g., v0.29 )
98+ # Produces most recent tag (e.g., v2.7.5 )
9999 git describe --abbrev=0 --tags
100- # Increment that value, create a new one (e.g, v0.30), and push
100+ # Increment that value, create a new one (e.g, v2.7.6)
101101 git tag -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
102102 ```
103103
104- 1. Run ` make all` . If running the release macOS you may need to install
104+ 1. Make sure that the repo is reported as clean, e.g.
105+
106+ ` ` ` shell
107+ git describe --tags --dirty --always
108+ ` ` `
109+
110+ This will ensure that version information for language libraries
111+ will be generated cleanly.
112+
113+ If running the release macOS you may need to install
105114 llvm though brew (recommend installing llvm 6 with ` brew instal llvm@6` )
106115 then add it to your path with ` export PATH=$( brew --prefix llvm@6) /bin:$PATH ` .
107116 You can also use Nixpkgs to setup a complete build environment for
108117 running a release. [Install Nixpkgs](https://nixos.org/nix/download.html)
109118 and then run ` nix-shell` prior to running ` make all` .
110119
111- 2. This will bump versions in the following files:
112- - ` python/sbp/RELEASE-VERSION`
113- - ` docs/sbp.pdf`
114- - ` haskell/sbp.cabal`
115- - ` package.json`
116- - ` c/include/libsbp/version.h`
117- - ` package-lock.json` -- you can typically revert all the changes in this
118- file except for the libsbp version change:
119- ` ` ` shell
120- git add -p package-lock.json
121- # enter 'y' for version change, 'd' to stop adding changes
122- git commit -m ' package-lock.json version bump'
123- git checkout package-lock.json
124- ` ` `
125- Commit the docs, these above version bumps and re-tag:
126- ` ` ` shell
127- git add docs/sbp.pdf
128- git commit -m ' Update docs'
129- git add python/sbp/RELEASE-VERSION haskell/sbp.cabal.m4 package.json c/include/libsbp/version.h
130- git commit -m ' Version bumps'
131- git tag -f -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
132- ` ` `
133-
134- 3. Verify that package dependencies, their version numbers, and the
120+ 2. Run make tagets for each language and re-tag. For python:
121+
122+ ` ` ` shell
123+ make python pythonNG
124+ git add python/sbp/RELEASE-VERSION
125+ git commit -m ' INCREMENTED_TAG'
126+ git tag -f -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
127+ ` ` `
128+
129+ For Java, jsonschema, and Protobuf (these should not require bumping the git tag,
130+ unless the geneated files are out of date):
131+
132+ ` ` ` shell
133+ make java jsonschema protobuf rust
134+ ` ` `
135+
136+ For C, Haskell and JavaScript:
137+
138+ ` ` ` shell
139+ make c haskell javascript
140+ git add c/include/libsbp/version.h sbp.cabal package.json package-lock.json
141+ git commit -m ' INCREMENTED_TAG'
142+ git tag -f -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
143+ ` ` `
144+
145+ 3. Finally, build the docs:
146+
147+ ` ` ` shell
148+ make docs
149+ ` ` `
150+
151+ Then commit the docs and re-tag:
152+
153+ ` ` ` shell
154+ git add docs/sbp.pdf
155+ git commit -m ' Update docs'
156+ git tag -f -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
157+ ` ` `
158+
159+ 4. Verify that package dependencies, their version numbers, and the
135160 libsbp version number in the C, Python, JavaScript, and LaTeX developer
136161 documentation are consistent.
137162
138163 - JavaScript: Manually update ` package-lock.json` .
139164
140165 - Others: should be automatically extracted from git tag
141166
142- 4 . Update the CHANGELOG details with ` make release` . Submit a pull request and
167+ 5 . Update the CHANGELOG details with ` make release` . Submit a pull request and
143168 get it merged. This requires
144169 [github-changelog-generator](https://github.com/skywinder/github-changelog-generator),
145170 and a ` CHANGELOG_GITHUB_TOKEN` in your ` PATH` if you don' t already have
146171 them.
147172
148- 5 . After the release PR is merged, recreate the tag:
173+ 6 . After the release PR is merged, recreate the tag:
149174 ```shell
150175 git checkout master
151176 git pull
@@ -154,11 +179,11 @@ Ubuntu 16.04.
154179 git push origin INCREMENTED_TAG
155180 ```
156181
157- 6 . Create a release on
182+ 7 . Create a release on
158183 [GitHub](https://github.com/swift-nav/libsbp/releases) and add the
159184 RELEASE_NOTES.md.
160185
161- 7 . Distribute release packages. You can attempt to run all releases
186+ 8 . Distribute release packages. You can attempt to run all releases
162187 with `make dist` -- this will likely not work through... it is
163188 advisable to run each dist target separately. In particular:
164189
@@ -174,7 +199,7 @@ Ubuntu 16.04.
174199 update all other supported languages when we make an official firmware
175200 release.
176201
177- 8 . Releases are not only never perfect, they never really end. Please
202+ 9 . Releases are not only never perfect, they never really end. Please
178203 pay special attention to any downstream projects or users that may
179204 have issues or regressions as a consequence of the release version.
180205
@@ -283,6 +308,17 @@ Tox also seems to have issues interacting with conda environments. The easiest
283308way to work around this is to remove conda from your path and make sure tox is
284309installed with a Python2 version of the interpreter.
285310
311+ ### Tox error: `ERROR: cowardly refusing to delete envdir`
312+
313+ Tox may fail with the following error:
314+
315+ ERROR: cowardly refusing to delete `envdir` (it does not look like a virtualenv): /home/ubuntu/dev/libsbp/python/.tox/py38-nojit
316+
317+ There' s an open tox issue for this: https://github.com/tox-dev/tox/issues/1354
318+ -- the only workaround that resolved this was to downgrade tox:
319+
320+ pip install --upgrade --force-reinstall tox==3.12.1
321+
286322# Contributions
287323
288324This library is developed internally by Swift Navigation. We welcome
0 commit comments