]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - doc/md/Release-Shaarli.md
documentation: fix rendering and internal references
[github/shaarli/Shaarli.git] / doc / md / Release-Shaarli.md
1 See [Git - Maintaining a project - Tagging your
2 releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases).
3
4 ## Prerequisites
5 This guide assumes that you have:
6
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
13 - maintainer permissions on the main Shaarli repository, to:
14 - push the signed tag
15 - create a new release
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.
18
19 ## GitHub release draft and `CHANGELOG.md`
20 See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
21
22 ### GitHub release draft
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`.
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
38 [...]
39 ## vA.B.C - UNRELEASED
40 TBA
41
42 ## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD
43 [...]
44 ```
45
46
47 ## Increment the version code, update docs, create and push a signed tag
48 ### Generate documentation
49 ```bash
50 $ cd /path/to/shaarli
51
52 # create a new branch
53 $ git fetch upstream
54 $ git checkout upstream/master -b v0.5.0
55
56 # rebuild the HTML documentation from Markdown
57 $ make htmlpages
58
59 # commit the changes
60 $ git add doc
61 $ git commit -s -m "Generate documentation for v0.5.0"
62
63 # push the commit on your GitHub fork
64 $ git push origin v0.5.0
65 ```
66
67 ### Create and merge a Pull Request
68 This one is pretty straightforward ;-)
69
70 ### Bump Shaarli version to v0.x branch
71
72 ```
73 $ git checkout master
74 $ git fetch upstream
75 $ git pull upstream master
76
77 # IF the branch doesn't exists
78 $ git checkout -b v0.5
79 # OR if the branch already exists
80 $ git checkout v0.5
81 $ git rebase upstream/master
82
83 # Bump shaarli version from dev to 0.5.0, **without the `v`**
84 $ vim shaarli_version.php
85 $ git add shaarli_version
86 $ git commit -s -m "Bump Shaarli version to v0.5.0"
87 $ git push upstream v0.5
88 ```
89
90 ### Create and push a signed tag
91 ```bash
92 # update your local copy
93 $ git checkout v0.5
94 $ git fetch upstream
95 $ git pull upstream v0.5
96
97 # create a signed tag
98 $ git tag -s -m "Release v0.5.0" v0.5.0
99
100 # push it to "upstream"
101 $ git push --tags upstream
102 ```
103
104 ### Verify a signed tag
105 [`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli.
106
107 Let's have a look at its signature!
108
109 ```bash
110 $ cd /path/to/shaarli
111 $ git fetch upstream
112
113 # get the SHA1 reference of the tag
114 $ git show-ref tags/v0.5.0
115 f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
116
117 # verify the tag signature information
118 $ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
119 gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
120 gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate]
121 ```
122
123 ## Publish the GitHub release
124 ### Update release badges
125 Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch.
126
127 ### Create a GitHub release from a Git tag
128 From the previously drafted release:
129
130 - edit the release notes (if needed)
131 - specify the appropriate Git tag
132 - publish the release
133 - profit!
134
135 ### Generate and upload all-in-one release archives
136 Users with a shared hosting may have:
137
138 - no SSH access
139 - no possibility to install PHP packages or server extensions
140 - no possibility to run scripts
141
142 To ease Shaarli installations, it is possible to generate and upload additional release archives,
143 that will contain Shaarli code plus all required third-party libraries.
144
145 **From the `v0.5` branch:**
146
147 ```bash
148 $ make release_archive
149 ```
150
151 This will create the following archives:
152
153 - `shaarli-vX.Y.Z-full.tar`
154 - `shaarli-vX.Y.Z-full.zip`
155
156 The archives need to be manually uploaded on the previously created GitHub release.
157
158 ### Update `stable` and `latest` branches
159
160 ```
161 $ git checkout latest
162 # latest release
163 $ git merge v0.5.0
164 # fix eventual conflicts
165 $ make test
166 $ git push upstream latest
167 $ git checkout stable
168 # latest previous major
169 $ git merge v0.4.5
170 # fix eventual conflicts
171 $ make test
172 $ git push upstream stable
173 ```