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