diff options
Diffstat (limited to 'doc/md/Release-Shaarli.md')
-rw-r--r-- | doc/md/Release-Shaarli.md | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md new file mode 100644 index 00000000..0e445272 --- /dev/null +++ b/doc/md/Release-Shaarli.md | |||
@@ -0,0 +1,169 @@ | |||
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 | - a GPG key matching your GitHub authentication credentials | ||
7 | - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig` | ||
8 | - a GitHub fork of Shaarli | ||
9 | - a local clone of your Shaarli fork, with the following remotes: | ||
10 | - `origin` pointing to your GitHub fork | ||
11 | - `upstream` pointing to the main Shaarli repository | ||
12 | - maintainer permissions on the main Shaarli repository, to: | ||
13 | - push the signed tag | ||
14 | - create a new release | ||
15 | - [Composer](https://getcomposer.org/) needs to be installed | ||
16 | - The [venv](https://docs.python.org/3/library/venv.html) Python 3 module needs to be installed for HTML documentation generation. | ||
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`. | ||
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 | [...] | ||
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 | ||
42 | [...] | ||
43 | ``` | ||
44 | |||
45 | |||
46 | ## Increment the version code, updated docs, create and push a signed tag | ||
47 | ### Generate documentation | ||
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 | # rebuild the HTML documentation from Markdown | ||
56 | $ make htmlpages | ||
57 | |||
58 | # commit the changes | ||
59 | $ git add doc | ||
60 | $ git commit -s -m "Generate documentation for v0.5.0" | ||
61 | |||
62 | # push the commit on your GitHub fork | ||
63 | $ git push origin v0.5.0 | ||
64 | ``` | ||
65 | |||
66 | ### Create and merge a Pull Request | ||
67 | This one is pretty straightforward ;-) | ||
68 | |||
69 | ### Bump Shaarli version to v0.x branch | ||
70 | |||
71 | ``` | ||
72 | $ git checkout master | ||
73 | $ git fetch upstream | ||
74 | $ git pull upstream master | ||
75 | |||
76 | # IF the branch doesn't exists | ||
77 | $ git checkout -b v0.5 | ||
78 | # OR if the branch already exists | ||
79 | $ git checkout v0.5 | ||
80 | $ git rebase upstream/master | ||
81 | |||
82 | # Bump shaarli version from dev to 0.5.0, **without the `v`** | ||
83 | $ vim shaarli_version.php | ||
84 | $ git add shaarli_version | ||
85 | $ git commit -s -m "Bump Shaarli version to v0.5.0" | ||
86 | $ git push upstream v0.5 | ||
87 | ``` | ||
88 | |||
89 | ### Create and push a signed tag | ||
90 | ```bash | ||
91 | # update your local copy | ||
92 | $ git checkout v0.5 | ||
93 | $ git fetch upstream | ||
94 | $ git pull upstream v0.5 | ||
95 | |||
96 | # create a signed tag | ||
97 | $ git tag -s -m "Release v0.5.0" v0.5.0 | ||
98 | |||
99 | # push it to "upstream" | ||
100 | $ git push --tags upstream | ||
101 | ``` | ||
102 | |||
103 | ### Verify a signed tag | ||
104 | [`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli. | ||
105 | |||
106 | Let's have a look at its signature! | ||
107 | |||
108 | ```bash | ||
109 | $ cd /path/to/shaarli | ||
110 | $ git fetch upstream | ||
111 | |||
112 | # get the SHA1 reference of the tag | ||
113 | $ git show-ref tags/v0.5.0 | ||
114 | f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0 | ||
115 | |||
116 | # verify the tag signature information | ||
117 | $ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1 | ||
118 | gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F | ||
119 | gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate] | ||
120 | ``` | ||
121 | |||
122 | ## Publish the GitHub release | ||
123 | ### Update release badges | ||
124 | Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch. | ||
125 | |||
126 | ### Create a GitHub release from a Git tag | ||
127 | From the previously drafted release: | ||
128 | - edit the release notes (if needed) | ||
129 | - specify the appropriate Git tag | ||
130 | - publish the release | ||
131 | - profit! | ||
132 | |||
133 | ### Generate and upload all-in-one release archives | ||
134 | Users with a shared hosting may have: | ||
135 | - no SSH access | ||
136 | - no possibility to install PHP packages or server extensions | ||
137 | - no possibility to run scripts | ||
138 | |||
139 | To ease Shaarli installations, it is possible to generate and upload additional release archives, | ||
140 | that will contain Shaarli code plus all required third-party libraries. | ||
141 | |||
142 | **From the `v0.5` branch:** | ||
143 | |||
144 | ```bash | ||
145 | $ make release_archive | ||
146 | ``` | ||
147 | |||
148 | This will create the following archives: | ||
149 | - `shaarli-vX.Y.Z-full.tar` | ||
150 | - `shaarli-vX.Y.Z-full.zip` | ||
151 | |||
152 | The archives need to be manually uploaded on the previously created GitHub release. | ||
153 | |||
154 | ### Update `stable` and `latest` branches | ||
155 | |||
156 | ``` | ||
157 | $ git checkout latest | ||
158 | # latest release | ||
159 | $ git merge v0.5.0 | ||
160 | # fix eventual conflicts | ||
161 | $ make test | ||
162 | $ git push upstream latest | ||
163 | $ git checkout stable | ||
164 | # latest previous major | ||
165 | $ git merge v0.4.5 | ||
166 | # fix eventual conflicts | ||
167 | $ make test | ||
168 | $ git push upstream stable | ||
169 | ``` | ||