Make a new release » History » Version 5
neels, 12/09/2016 10:21 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 | * tag a release in @libosmocore@, say if the previous revision was 0.1.2, we make it at least 0.1.3. |
||
11 | * in @openbsc@, require @libosmogsm@ >= 0.1.3 in @configure.ac@ |
||
12 | |||
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 | git tag -s 0.1.3 012342abcdefg |
||
29 | </pre> |
||
30 | |||
31 | (If @gpg@ complains, see below.) |
||
32 | |||
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 | 4 | neels | For your local build, _nothing will change_ until you delete the @.version@ file: |
40 | 1 | neels | <pre> |
41 | rm .version |
||
42 | make |
||
43 | cat .version |
||
44 | </pre> |
||
45 | |||
46 | This should show the same as @git describe@. |
||
47 | |||
48 | When you're convinced that all is in order, push the new tag: |
||
49 | |||
50 | <pre> |
||
51 | git push origin 0.1.3 |
||
52 | </pre> |
||
53 | |||
54 | 5 | neels | If anything went wrong, you can delete the tag (locally) by |
55 | <pre> |
||
56 | git tag -d 0.1.3 |
||
57 | </pre> |
||
58 | and, if you've already pushed it, by |
||
59 | <pre> |
||
60 | git push --delete origin 0.1.3 |
||
61 | </pre> |
||
62 | |||
63 | 1 | neels | h2. Make a Release |
64 | |||
65 | TODO: describe how to build and publish a release for real |
||
66 | |||
67 | |||
68 | h2. GPG: Have a matching user id |
||
69 | |||
70 | By default, @git tag -s@ takes your author information to lookup the secret GPG key to sign a tag with. |
||
71 | If the author+email do not exactly match one of the key's @uid@s, you will get this error: |
||
72 | |||
73 | <pre> |
||
74 | gpg: signing failed: secret key not available |
||
75 | </pre> |
||
76 | |||
77 | Verify: say, your author+email info in your git config says "John Doe <john@doe.net>", try |
||
78 | <pre> |
||
79 | gpg --list-secret-keys "John Doe <john@doe.net>" |
||
80 | </pre> |
||
81 | If this fails, GPG won't find the right key automatically. |
||
82 | |||
83 | Ways to resolve: |
||
84 | |||
85 | * Use @git tag -u <key-id>@ |
||
86 | * Edit your secret key to add a uid that matches your author information |
||
87 | <pre> |
||
88 | gpg --edit-key john@doe.net |
||
89 | gpg> adduid |
||
90 | # enter details to match the git author |
||
91 | gpg> save |
||
92 | </pre> |