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