Make a new release » History » Version 12
msuraev, 12/14/2016 12:41 PM
1 | 2 | neels | h1. Make a new release |
---|---|---|---|
2 | 1 | neels | |
3 | h2. When to tag a new release |
||
4 | |||
5 | Various Osmocom projects depend on others. As soon as a feature is added to one Osmocom project that is needed for another dependent project to compile, we should tag at least a minor-revision bump in the depended-upon project and require it in the depending project's configure.ac. To illustrate, let's look at this example: |
||
6 | |||
7 | Among others, @openbsc@ depends on the libraries built from @libosmocore@, for example @libosmogsm@. |
||
8 | As soon as the @libosmogsm@ library gets a new feature used by @openbsc@, like something was added to |
||
9 | @gsm_utils.h@, we shall |
||
10 | 6 | neels | * tag a release in @libosmocore@; say if the previous version was 0.1.2, make it at least 0.1.3. |
11 | * and in @openbsc@, require @libosmogsm@ >= 0.1.3 in @configure.ac@ |
||
12 | 1 | neels | |
13 | h2. How to tag a new release |
||
14 | |||
15 | The revision to tag must be merged to the public, upstream @master@ branch. |
||
16 | |||
17 | Find out the git hash for the revision you want to tag. |
||
18 | |||
19 | 3 | neels | Find out the next open version number. Take care: look at *all* of these: |
20 | 1 | neels | * @git tag -l@ |
21 | * debian/changelog |
||
22 | For example, the changelog may contain versions that were forgotten to be tagged. |
||
23 | |||
24 | 3 | neels | Now, make a GPG-signed tag of that git hash with the next open version number. |
25 | 1 | neels | |
26 | 3 | neels | Say, for example, the git hash is @012342abcdefg@ and the next open version is 0.1.3: |
27 | 1 | neels | <pre> |
28 | 9 | neels | git tag -s 0.1.3 012342abcdefg -m "release 0.1.3" |
29 | 1 | neels | </pre> |
30 | |||
31 | 8 | neels | (If @gpg@ complains, see [[Make a new release#GPG-Have-a-matching-user-id|GPG: Have a matching user id]].) |
32 | 1 | neels | |
33 | 4 | neels | Verify that git picks up the new version tag: |
34 | 1 | neels | <pre> |
35 | $ git describe |
||
36 | 0.1.3-3-g1f95179 |
||
37 | </pre> |
||
38 | |||
39 | 11 | neels | *For your local build, _nothing will change_ until you delete the @.version@ file |
40 | and completely rebuild:* |
||
41 | |||
42 | 1 | neels | <pre> |
43 | rm .version |
||
44 | 10 | neels | autoreconf -fi |
45 | ./configure |
||
46 | 1 | neels | make |
47 | cat .version |
||
48 | </pre> |
||
49 | |||
50 | This should show the same as @git describe@. |
||
51 | |||
52 | When you're convinced that all is in order, push the new tag: |
||
53 | |||
54 | <pre> |
||
55 | git push origin 0.1.3 |
||
56 | </pre> |
||
57 | |||
58 | 5 | neels | If anything went wrong, you can delete the tag (locally) by |
59 | <pre> |
||
60 | git tag -d 0.1.3 |
||
61 | </pre> |
||
62 | and, if you've already pushed it, by |
||
63 | <pre> |
||
64 | git push --delete origin 0.1.3 |
||
65 | </pre> |
||
66 | |||
67 | 1 | neels | h2. Make a Release |
68 | |||
69 | 12 | msuraev | TODO: more detailed description of necessary release steps |
70 | 1 | neels | |
71 | 12 | msuraev | * cleanup TODO-RELEASE file if not empty, bumping API versions accordingly (see comments in TODO-RELEASE) |
72 | * update debian/changelog using "gbp dch" command |
||
73 | * ??? |
||
74 | * PROFIT |
||
75 | 1 | neels | |
76 | h2. GPG: Have a matching user id |
||
77 | |||
78 | By default, @git tag -s@ takes your author information to lookup the secret GPG key to sign a tag with. |
||
79 | If the author+email do not exactly match one of the key's @uid@s, you will get this error: |
||
80 | |||
81 | <pre> |
||
82 | gpg: signing failed: secret key not available |
||
83 | </pre> |
||
84 | |||
85 | Verify: say, your author+email info in your git config says "John Doe <john@doe.net>", try |
||
86 | <pre> |
||
87 | gpg --list-secret-keys "John Doe <john@doe.net>" |
||
88 | </pre> |
||
89 | If this fails, GPG won't find the right key automatically. |
||
90 | |||
91 | Ways to resolve: |
||
92 | |||
93 | * Use @git tag -u <key-id>@ |
||
94 | * Edit your secret key to add a uid that matches your author information |
||
95 | <pre> |
||
96 | gpg --edit-key john@doe.net |
||
97 | gpg> adduid |
||
98 | # enter details to match the git author |
||
99 | gpg> save |
||
100 | </pre> |