1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
#
# Create a GitHub release for each tag the repository carries, with the
# notes for each taken from docs/release-notes/<version>.md.
#
# A tag on its own is enough for the CHANGELOG's footer links, which
# point at releases/tag/vX.Y.Z and resolve whether or not a release
# exists. This exists so that page carries the version's notes rather
# than just its commit.
#
# The notes are the version's CHANGELOG section, with a lede added
# where the section alone does not say what a dependent will see. They
# are kept as files rather than extracted here because of that lede: a
# release that changed neither tool says so in its notes and nowhere in
# the changelog.
#
# Releases that already exist are left alone, so this can be re-run
# after adding a tag and its notes file without touching the ones
# already published. --verify-tag refuses a version whose tag is not
# there rather than creating one.
#
# Requires gh, authenticated with a token that has Contents:
# read and write on this repository. Without it every creation fails
# with "Resource not accessible by personal access token" -- note that
# pushing over SSH works without that permission, so a working `git
# push` does not mean this will run.
#
# The sibling tcslog repository carries the same script for its own
# tags. Neither knows about the other's releases.
# Oldest first, so the releases page reads in order. The last is marked
# latest; gh would otherwise give that to whichever was created last.
VERSIONS="0.1.0 0.1.1 0.1.2 0.1.3 0.1.4 0.1.5 0.1.6 0.1.7"
notes_dir="/../docs/release-notes"
newest=""
for; do
newest=""
done
for; do
notes="/.md"
if [; then
fi
if ; then
continue
fi
latest=()
if [; then
latest=(--latest)
fi
done