Project

General

Profile

Make a new release » History » Version 11

neels, 12/09/2016 10:37 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
TODO: describe how to build and publish a release for real
70
71
72
h2. GPG: Have a matching user id
73
74
By default, @git tag -s@ takes your author information to lookup the secret GPG key to sign a tag with.
75
If the author+email do not exactly match one of the key's @uid@s, you will get this error:
76
77
<pre>
78
gpg: signing failed: secret key not available
79
</pre>
80
81
Verify: say, your author+email info in your git config says "John Doe <john@doe.net>", try
82
<pre>
83
gpg --list-secret-keys "John Doe <john@doe.net>"
84
</pre>
85
If this fails, GPG won't find the right key automatically.
86
87
Ways to resolve:
88
89
* Use @git tag -u <key-id>@
90
* Edit your secret key to add a uid that matches your author information
91
<pre>
92
gpg --edit-key john@doe.net
93
gpg> adduid
94
# enter details to match the git author
95
gpg> save
96
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)