]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - doc/Release-Shaarli.md
Fix blocking namespace issue
[github/shaarli/Shaarli.git] / doc / Release-Shaarli.md
1 #Release Shaarli
2 See [Git - Maintaining a project - Tagging your [](.html)
3 releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases).
4
5 ## Prerequisites
6 This guide assumes that you have:
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/) and [Pandoc](http://pandoc.org/) need to be installed[](.html)
17
18 ## GitHub release draft and `CHANGELOG.md`
19 See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
20
21 ### GitHub release draft
22 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`.[](.html)
23
24 ### `CHANGELOG.md`
25 This file should contain the same information as the release note draft for the upcoming version.
26
27 Update it to:
28 - add new entries (additions, fixes, etc.)
29 - mark the current version as released by setting its date and link
30 - add a new section for the future unreleased version
31
32 ```bash
33 $ cd /path/to/shaarli
34
35 $ nano CHANGELOG.md
36
37 [...][](.html)
38 ## vA.B.C - UNRELEASED
39 TBA
40
41 ## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html)
42 [...][](.html)
43 ```
44
45
46 ## Increment the version code, create and push a signed tag
47 ### Bump Shaarli's version
48 ```bash
49 $ cd /path/to/shaarli
50
51 # create a new branch
52 $ git fetch upstream
53 $ git checkout upstream/master -b v0.5.0
54
55 # bump the version number
56 $ vim index.php shaarli_version.php
57
58 # rebuild the documentation from the wiki
59 $ make htmldoc
60
61 # commit the changes
62 $ git add index.php shaarli_version.php doc
63 $ git commit -s -m "Bump version to v0.5.0"
64
65 # push the commit on your GitHub fork
66 $ git push origin v0.5.0
67 ```
68
69 ### Create and merge a Pull Request
70 This one is pretty straightforward ;-)
71
72 ### Create and push a signed tag
73 ```bash
74 # update your local copy
75 $ git checkout master
76 $ git fetch upstream
77 $ git pull upstream master
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.[](.html)
88
89 Let'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
97 f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
98
99 # verify the tag signature information
100 $ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
101 gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
102 gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate][](.html)
103 ```
104
105 ## Publish the GitHub release
106 ### Create a GitHub release from a Git tag
107 From the previously drafted release:
108 - edit the release notes (if needed)
109 - specify the appropriate Git tag
110 - publish the release
111 - profit!
112
113 ### Generate and upload all-in-one release archives
114 Users with a shared hosting may have:
115 - no SSH access
116 - no possibility to install PHP packages or server extensions
117 - no possibility to run scripts
118
119 To ease Shaarli installations, it is possible to generate and upload additional release archives,
120 that will contain Shaarli code plus all required third-party libraries:
121
122 ```bash
123 $ make release_archive
124 ```
125
126 This will create the following archives:
127 - `shaarli-vX.Y.Z-full.tar`
128 - `shaarli-vX.Y.Z-full.zip`
129
130 The archives need to be manually uploaded on the previously created GitHub release.