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