1HarfBuzz release walk-through checklist:
2
31. Open gitk and review changes since last release.
4
5   * `git diff $(git describe | sed 's/-.*//').. src/*.h` prints all public API
6     changes.
7
8     Document them in NEWS.  All API and API semantic changes should be clearly
9     marked as API additions, API changes, or API deletions.  Document
10     deprecations.  Ensure all new API / deprecations are in listed correctly in
11     docs/harfbuzz-sections.txt.  If release added new API, add entry for new
12     API index at the end of docs/harfbuzz-docs.xml.
13
14     If there's a backward-incompatible API change (including deletions for API
15     used anywhere), that's a release blocker.  Do NOT release.
16
172. Based on severity of changes, decide whether it's a minor or micro release
18   number bump,
19
203. Search for REPLACEME on the repository and replace it with the chosen version
21   for the release.
22
234. Make sure you have correct date and new version at the top of NEWS file,
24
255. Bump version in configure.ac line 3,
26
276. Do "make distcheck", if it passes, you get a tarball.
28   Otherwise, fix things and commit them separately before making release,
29   Note: Check src/hb-version.h and make sure the new version number is
30   there.  Sometimes, it does not get updated.  If that's the case,
31   "touch configure.ac" and rebuild.  Also check that there is no hb-version.h
32   in your build/src file. Typically it will fail the distcheck if there is.
33   That's what happened to 2.0.0 going out with 1.8.0 hb-version.h...  So, that's
34   a clue.
35
367. "make release-files".  Enter your GPG password.  This creates a sha256 hash
37   and signs it.
38
398. Now that you have release files, commit NEWS, configure.ac, and src/hb-version.h,
40   as well as any REPLACEME changes you made.  The commit message is simply the
41   release number.  Eg. "1.4.7"
42
439. Tag the release and sign it: Eg. "git tag -s 1.4.7 -m 1.4.7".  Enter your
44   GPG password again.
45
4610. Build win32 bundle.
47
48   a. Put contents of [this](https://drive.google.com/open?id=0B3_fQkxDZZXXbWltRGd5bjVrUDQ) on your `~/.local/i686-w64-mingw32`,
49
50   b. Run `../mingw32.sh --with-uniscribe` script to configure harfbuzz with mingw
51   in a subdirector (eg. winbuild/),
52
53   c. make
54
55   d. Back in the parent directory, run `./UPDATE.sh`(available below) to build win32
56      bundle.
57
5811. Copy all artefacts to users.freedesktop.org and move them into
59    `/srv/www.freedesktop.org/www/software/harfbuzz/release` There should be four
60    files.  Eg.:
61 ```
62-rw-r--r--  1 behdad eng 1592693 Jul 18 11:25 harfbuzz-1.4.7.tar.bz2
63-rw-r--r--  1 behdad eng      89 Jul 18 11:34 harfbuzz-1.4.7.tar.bz2.sha256
64-rw-r--r--  1 behdad eng     339 Jul 18 11:34 harfbuzz-1.4.7.tar.bz2.sha256.asc
65-rw-r--r--  1 behdad eng 2895619 Jul 18 11:34 harfbuzz-1.4.7-win32.zip
66```
67
6812. While doing that, quickly double-check the size of the .tar.bz2 and .zip
69    files against their previous releases to make sure nothing bad happened.
70    They should be in the ballpark, perhaps slightly larger.  Sometimes they
71    do shrink, that's not by itself a stopper.
72
7313. Push the commit and tag out: "git push --follow-tags".  Make sure it's
74    pushed both to freedesktop repo and github.
75
7614. Go to GitHub release page [here](https://github.com/harfbuzz/harfbuzz/releases),
77    edit the tag, upload artefacts and NEWS entry and save.
78
79
80## UPDATE.sh
81```bash
82#!/bin/bash
83
84v=$1
85
86if test "x$v" = x; then
87	echo "usage: UPDATE.sh micro-version"
88	exit 1
89fi
90
91dir_prefix=harfbuzz-1.4.
92dir_suffix=-win32
93dir=$dir_prefix$v$dir_suffix
94dir_old=$dir_prefix$((v-1))$dir_suffix
95if test -d "$dir"; then
96	echo "New dir $dir exists; not overwriting"
97	exit 1
98fi
99if ! test -d "$dir_old"; then
100	echo "Old dir $dir_old does NOT exist; aborting"
101	exit 1
102fi
103set -ex
104cp -a "$dir_old" "$dir.tmp"
105rm -f "$dir.tmp"/GDX32.dll
106rm -f "$dir.tmp"/usp10.dll
107cp ../winbuild/src/.libs/libharfbuzz-0.dll{,.def} $dir.tmp/
108cp ../winbuild/util/.libs/hb-{shape,view}.exe $dir.tmp/
109i686-w64-mingw32-strip $dir.tmp/{hb-shape.exe,hb-view.exe,libharfbuzz-0.dll}
110mv $dir.tmp $dir
111zip -r $dir.zip $dir
112echo Bundle $dir.zip ready
113```
114