]>
Commit | Line | Data |
---|---|---|
53ed6d7d | 1 | See [Git - Maintaining a project - Tagging your |
5409ade2 A |
2 | releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases). |
3 | ||
fdf88d19 | 4 | ## Prerequisites |
5409ade2 | 5 | This guide assumes that you have: |
43ad7c8e | 6 | |
5409ade2 A |
7 | - a GPG key matching your GitHub authentication credentials |
8 | - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig` | |
9 | - a GitHub fork of Shaarli | |
10 | - a local clone of your Shaarli fork, with the following remotes: | |
11 | - `origin` pointing to your GitHub fork | |
12 | - `upstream` pointing to the main Shaarli repository | |
3cc8c898 A |
13 | - maintainer permissions on the main Shaarli repository, to: |
14 | - push the signed tag | |
15 | - create a new release | |
081a7348 | 16 | - [Composer](https://getcomposer.org/) needs to be installed |
17 | - The [venv](https://docs.python.org/3/library/venv.html) Python 3 module needs to be installed for HTML documentation generation. | |
5409ade2 | 18 | |
3cc8c898 A |
19 | ## GitHub release draft and `CHANGELOG.md` |
20 | See http://keepachangelog.com/en/0.3.0/ for changelog formatting. | |
21 | ||
22 | ### GitHub release draft | |
53ed6d7d | 23 | GitHub allows drafting the release note for the upcoming release, from the [Releases](https://github.com/shaarli/Shaarli/releases) page. This way, the release note can be drafted while contributions are merged to `master`. |
3cc8c898 A |
24 | |
25 | ### `CHANGELOG.md` | |
26 | This file should contain the same information as the release note draft for the upcoming version. | |
27 | ||
28 | Update it to: | |
29 | - add new entries (additions, fixes, etc.) | |
30 | - mark the current version as released by setting its date and link | |
31 | - add a new section for the future unreleased version | |
32 | ||
33 | ```bash | |
34 | $ cd /path/to/shaarli | |
35 | ||
36 | $ nano CHANGELOG.md | |
37 | ||
53ed6d7d | 38 | [...] |
3cc8c898 A |
39 | ## vA.B.C - UNRELEASED |
40 | TBA | |
41 | ||
53ed6d7d | 42 | ## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD |
43 | [...] | |
3cc8c898 A |
44 | ``` |
45 | ||
46 | ||
43ad7c8e | 47 | ## Increment the version code, update docs, create and push a signed tag |
5409ade2 A |
48 | ### Create and merge a Pull Request |
49 | This one is pretty straightforward ;-) | |
50 | ||
53ed6d7d | 51 | ### Bump Shaarli version to v0.x branch |
52 | ||
23daed64 | 53 | ```bash |
53ed6d7d | 54 | $ git checkout master |
55 | $ git fetch upstream | |
56 | $ git pull upstream master | |
57 | ||
58 | # IF the branch doesn't exists | |
59 | $ git checkout -b v0.5 | |
60 | # OR if the branch already exists | |
61 | $ git checkout v0.5 | |
62 | $ git rebase upstream/master | |
63 | ||
64 | # Bump shaarli version from dev to 0.5.0, **without the `v`** | |
65 | $ vim shaarli_version.php | |
66 | $ git add shaarli_version | |
67 | $ git commit -s -m "Bump Shaarli version to v0.5.0" | |
68 | $ git push upstream v0.5 | |
69 | ``` | |
70 | ||
5409ade2 A |
71 | ### Create and push a signed tag |
72 | ```bash | |
73 | # update your local copy | |
53ed6d7d | 74 | $ git checkout v0.5 |
5409ade2 | 75 | $ git fetch upstream |
53ed6d7d | 76 | $ git pull upstream v0.5 |
5409ade2 A |
77 | |
78 | # create a signed tag | |
79 | $ git tag -s -m "Release v0.5.0" v0.5.0 | |
80 | ||
81 | # push it to "upstream" | |
82 | $ git push --tags upstream | |
83 | ``` | |
84 | ||
85 | ### Verify a signed tag | |
53ed6d7d | 86 | [`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli. |
5409ade2 A |
87 | |
88 | Let's have a look at its signature! | |
89 | ||
90 | ```bash | |
91 | $ cd /path/to/shaarli | |
92 | $ git fetch upstream | |
93 | ||
94 | # get the SHA1 reference of the tag | |
95 | $ git show-ref tags/v0.5.0 | |
96 | f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0 | |
97 | ||
98 | # verify the tag signature information | |
99 | $ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1 | |
100 | gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F | |
53ed6d7d | 101 | gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate] |
5409ade2 | 102 | ``` |
fdf88d19 | 103 | |
3cc8c898 | 104 | ## Publish the GitHub release |
b230bf20 | 105 | ### Update release badges |
53ed6d7d | 106 | Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch. |
b230bf20 | 107 | |
3cc8c898 A |
108 | ### Create a GitHub release from a Git tag |
109 | From the previously drafted release: | |
43ad7c8e | 110 | |
3cc8c898 A |
111 | - edit the release notes (if needed) |
112 | - specify the appropriate Git tag | |
113 | - publish the release | |
114 | - profit! | |
115 | ||
116 | ### Generate and upload all-in-one release archives | |
fdf88d19 | 117 | Users with a shared hosting may have: |
43ad7c8e | 118 | |
fdf88d19 A |
119 | - no SSH access |
120 | - no possibility to install PHP packages or server extensions | |
121 | - no possibility to run scripts | |
122 | ||
123 | To ease Shaarli installations, it is possible to generate and upload additional release archives, | |
53ed6d7d | 124 | that will contain Shaarli code plus all required third-party libraries. |
125 | ||
126 | **From the `v0.5` branch:** | |
fdf88d19 A |
127 | |
128 | ```bash | |
129 | $ make release_archive | |
130 | ``` | |
131 | ||
132 | This will create the following archives: | |
43ad7c8e | 133 | |
fdf88d19 A |
134 | - `shaarli-vX.Y.Z-full.tar` |
135 | - `shaarli-vX.Y.Z-full.zip` | |
136 | ||
137 | The archives need to be manually uploaded on the previously created GitHub release. | |
53ed6d7d | 138 | |
139 | ### Update `stable` and `latest` branches | |
140 | ||
141 | ``` | |
142 | $ git checkout latest | |
143 | # latest release | |
144 | $ git merge v0.5.0 | |
145 | # fix eventual conflicts | |
146 | $ make test | |
147 | $ git push upstream latest | |
148 | $ git checkout stable | |
149 | # latest previous major | |
150 | $ git merge v0.4.5 | |
151 | # fix eventual conflicts | |
152 | $ make test | |
153 | $ git push upstream stable | |
154 | ``` |