1 | Instructions for releasing ERFA
|
---|
2 | ===============================
|
---|
3 |
|
---|
4 | * Clone the ERFA repository from github (if you haven't already done so),
|
---|
5 | and change to the ERFA directory.
|
---|
6 |
|
---|
7 | * Make sure you are on the "master" branch from the "liberfa" github
|
---|
8 | repository and have the latest version (if you have a fresh clone, this
|
---|
9 | should already be the case).
|
---|
10 |
|
---|
11 | * If a new version of SOFA exists, run `sofa_deriver.py` from the `erfa-fetch
|
---|
12 | repository`_ in its own directory. That will create a directory called `erfa`
|
---|
13 | inside the `erfa-fetch` directory, and you should copy its contents to the
|
---|
14 | `src` directory of `erfa`. Add any new C files or header files added by SOFA
|
---|
15 | to ``src/Makefile.am``, as appropriate. Use ``git diff`` in `erfa` to inspect
|
---|
16 | the changes, and then commit and push them to github.
|
---|
17 |
|
---|
18 | * Update the version number in the `AC_INIT` macro of `configure.ac` to
|
---|
19 | the version number you are about to release, and also update the version
|
---|
20 | mentioned in `README.rst`. Follow the instructions in
|
---|
21 | `Version numbering` below.
|
---|
22 |
|
---|
23 | * Update the version info of the shared library in the `ERFA_LIB_VERSION_INFO`
|
---|
24 | macro of `configure.ac`. Follow the instructions in `Version numbering` below.
|
---|
25 |
|
---|
26 | * Commit these changes using ``git commit``, with a commit message like
|
---|
27 | ``Preparing release v0.0.1``.
|
---|
28 |
|
---|
29 | * Run `./bootstrap.sh`: you need `automake`, `autoconf` and `libtool`
|
---|
30 | installed. If no errors appear, this will create a new `./configure`
|
---|
31 | file.
|
---|
32 |
|
---|
33 | * Run ``./configure``, which should create a `Makefile` in the top level
|
---|
34 | directory and in ./src
|
---|
35 |
|
---|
36 | * Run ``make check``, which will build the library and run the tests -
|
---|
37 | make sure they pass before proceeding.
|
---|
38 |
|
---|
39 | * Run ``make distcheck``: this creates the distribution tarball,
|
---|
40 | unpackages it and runs the check inside the untarred directory.
|
---|
41 | The resulting tarball will be named e.g., `erfa-0.0.1.tar.gz` and
|
---|
42 | will be placed in the working directory.
|
---|
43 |
|
---|
44 | * Tag the current commit with the version number. A signed tag is preferred if
|
---|
45 | you have an a signing key (e.g., do ``git tag -s v0.0.1``).
|
---|
46 |
|
---|
47 | * Push up your changes and the new tag to github:
|
---|
48 | ``git push --tags origin master``. (The command here assumes the git remote
|
---|
49 | "origin" points to the "liberfa/erfa" repository. If not, substitute the
|
---|
50 | appropriate name.)
|
---|
51 |
|
---|
52 | * Go to the "liberfa/erfa" repository for the github page, and click on the
|
---|
53 | "releases" button, and then the release corresponding to the tag you just
|
---|
54 | made.
|
---|
55 |
|
---|
56 | * Click on the "Draft release notes or downloads" button (or it might be
|
---|
57 | "Edit release"). Put the version number as the title (e.g., ``v0.0.1``)and
|
---|
58 | for the description put ``See `README.rst` for release notes.``
|
---|
59 |
|
---|
60 | * Upload the tarball you created (e.g., `erfa-0.0.1.tar.gz`) by dropping it
|
---|
61 | in the area that says "Attach binaries for this release by dropping them
|
---|
62 | here."
|
---|
63 |
|
---|
64 | * Click the "Publish release" button.
|
---|
65 |
|
---|
66 | * Update the release listing on Github Pages to include this release:
|
---|
67 | Do ``git checkout gh-pages``, add a new ``<li>...</li>`` entry for the
|
---|
68 | release in `index.html`, do ``git commit``, and then
|
---|
69 | ``git push origin gh-pages``.
|
---|
70 |
|
---|
71 | Version numbering
|
---|
72 | =================
|
---|
73 |
|
---|
74 | ERFA needs to provide two different version numbers. You need to update both.
|
---|
75 | The first is the
|
---|
76 | **package version number** or **version number** proper. ERFA uses
|
---|
77 | `semantic versioning <http://semver.org/>`_ to create this number.
|
---|
78 | For more on this choice, see
|
---|
79 | `liberfa/erfa#6 <https://github.com/liberfa/erfa/issues/6>`_.
|
---|
80 |
|
---|
81 | The second number is `shared library version info`. When a program has been
|
---|
82 | linked with the ERFA shared library, the dynamic linker checks the version
|
---|
83 | info of the library requested by the program with those of the libraries
|
---|
84 | present if the system. This version info is important to binary distributions
|
---|
85 | (such as Linux distributions). ERFA uses `libtool versioning <http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html>`_.
|
---|
86 |
|
---|
87 |
|
---|
88 | Package version number
|
---|
89 | ----------------------
|
---|
90 |
|
---|
91 | Semantic versioning dictates how to change the version number according to
|
---|
92 | changes to the API of the library. In the case of ERFA the API is:
|
---|
93 |
|
---|
94 | * The public C macros defined in erfam.h
|
---|
95 | * The names, return types, number of arguments and types of the functions in erfa.h
|
---|
96 |
|
---|
97 | To update the package version, the release manager has to check the relevant
|
---|
98 | information about the release, such as:
|
---|
99 |
|
---|
100 | * upstream SOFA documentation in http://www.iausofa.org/current_changes.html
|
---|
101 | * relevant bug reports in the github project page
|
---|
102 |
|
---|
103 | If the version is given in the form MAJOR.MINOR.PATCH, then
|
---|
104 |
|
---|
105 | * if there is a backwards incompatible change (function removed, types of
|
---|
106 | arguments altered, macros renamed...) then increase MAJOR by one and set
|
---|
107 | the others to zero.
|
---|
108 | * else if there is backwards compatible change (new function added or
|
---|
109 | new macro added) then do not change MAJOR, increase MINOR by one and
|
---|
110 | set PATCH to zero.
|
---|
111 | * else
|
---|
112 | you are either fixing a bug or making other improvements. Increase
|
---|
113 | patch by one and do not change the others.
|
---|
114 |
|
---|
115 | Change the version number in the `AC_INIT` macro and in `README.rst`
|
---|
116 |
|
---|
117 | Shared library version info
|
---|
118 | ---------------------------
|
---|
119 |
|
---|
120 | For the shared library version info, we are only interested in a subset of
|
---|
121 | the API, the **interfaces of the shared library**. As the C macros are
|
---|
122 | interpolated away at compile time, the interfaces in the ERFA
|
---|
123 | shared library are:
|
---|
124 |
|
---|
125 | * The names, return types, number of arguments and types of the functions
|
---|
126 |
|
---|
127 | Again, the release manager has to review the relevant information:
|
---|
128 |
|
---|
129 | * upstream SOFA documentation in http://www.iausofa.org/current_changes.html
|
---|
130 | * relevant bug reports in the github project page
|
---|
131 |
|
---|
132 | The shared library version info is stored in three numbers called *current*,
|
---|
133 | *revision* and *age*. These numbers appear in the macro `ERFA_LIB_VERSION_INFO`
|
---|
134 | in the mentioned order.
|
---|
135 |
|
---|
136 | If the version is given in the form CURRENT,REVISION,AGE then
|
---|
137 |
|
---|
138 | * if there is a backwards incompatible change (function removed, types of
|
---|
139 | arguments altered...) then increase CURRENT by one and set
|
---|
140 | the others to zero (c,r,a -> c+1,0,0).
|
---|
141 | * else if there is backwards compatible change (new function added)
|
---|
142 | then increase both CURRENT and AGE by one, set REVISON to zero
|
---|
143 | (c,r,a -> c+1,0,a+1).
|
---|
144 | * else if the library code has been modified at all
|
---|
145 | then increase REVISION by one (c,r,a -> c,r+1,a)
|
---|
146 | * else
|
---|
147 | do not change the version info (c,r,a -> c,r,a)
|
---|
148 |
|
---|
149 | Change the verion info in `ERFA_LIB_VERSION_INFO`
|
---|
150 |
|
---|
151 | Examples
|
---|
152 | ---------
|
---|
153 | We start with ERFA version 1.0.0 and library version info 0,0,0
|
---|
154 |
|
---|
155 | * SOFA makes a new release. A function is added and two functions change their
|
---|
156 | arguments. This is a backawars incompatible change, so the new package will
|
---|
157 | have version 2.0.0 and the shared library version info will be 1,0,0
|
---|
158 |
|
---|
159 | * We forgot to add README.rst to the release. We make a new one. The change
|
---|
160 | is a bugfix (no API changes), the new release will be 2.0.1. The shared
|
---|
161 | library version is not modified (no changes in the library source code).
|
---|
162 |
|
---|
163 | * SOFA makes a new release. They just add a new function. The new package
|
---|
164 | version will be 2.1.0. The shared library info will be 2,0,1 (both current
|
---|
165 | and age are incremented).
|
---|
166 |
|
---|
167 | * SOFA makes a new relase fixing some bugs in the code without changing the
|
---|
168 | API. New package version is 2.1.1. The shared library version is 2,1,1
|
---|
169 |
|
---|
170 | * A contributor finds a bug in ERFA. The fix doesn't change the API. New
|
---|
171 | package version is 2.1.2. The shared library version is 2,2,1
|
---|
172 |
|
---|
173 | * SOFA makes a new release incorporating the bug fix and adding new functions.
|
---|
174 | The new package version is 2.2.0. The shared library version is 3,0,2
|
---|
175 |
|
---|
176 | * SOFA makes a new release removing functions. This is a backawars
|
---|
177 | incompatible change, so the new package will
|
---|
178 | have version 3.0.0 and the shared library version info will be 4,0,0
|
---|
179 |
|
---|
180 | .. _erfa-fetch repository: https://github.com/liberfa/erfa-fetch
|
---|