Skip to content

Commit 688cc2b

Browse files
committed
Add a RELEASE_HOWTO.
1 parent 9284e9c commit 688cc2b

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed

RELEASE_HOWTO.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# How to produce a `xml-dtd` release
2+
3+
Please follow these steps to produce a new release of xml-dtd.
4+
5+
## Requirements
6+
7+
- The [Git version control system](https://git-scm.com/downloads) is required to
8+
obtain the sources. Any recent version should suffice.
9+
10+
- Java 11 or later. You can install it from your favourite package manager or by
11+
downloading from [Adoptium](https://adoptium.net/).
12+
13+
- The [`generate_directory_index_caddystyle.py`](https://gist.github.com/carlosame/bd5b68c4eb8e0817d9beb1dcfb4de43d)
14+
script and a recent version of [Python](https://www.python.org/) (required to
15+
run it). The script is necessary to create the index files in the bare-bones
16+
Maven repository currently used by xml-dtd.
17+
18+
## Steps
19+
20+
1) If your local copy of the xml-dtd Git repository exactly matches the current
21+
`master` HEAD, use that copy to execute the `gradlew` commands shown later,
22+
otherwise create a new clone of the `[email protected]:css4j/xml-dtd.git`
23+
repository with `git clone` and use it.
24+
25+
For reference, let your copy of the xml-dtd release code be at
26+
`/path/to/xml-dtd`.
27+
28+
2) Use `changes.sh <new-version>` to create a `CHANGES.txt` file with the
29+
changes from the latest tag. For example if you are releasing `4.2.1`:
30+
31+
```shell
32+
cd /path/to/xml-dtd
33+
./changes.sh 4.2.1
34+
```
35+
36+
Edit the resulting `CHANGES.txt` as convenient, to use it as the basis for the
37+
detailed list of changes when you fill the `RELEASE_NOTES.md` and the new
38+
release in Github.
39+
40+
Complete the Release Notes and check whether the dependencies mentioned in the
41+
`README.md` are correct. Commit the changes.
42+
43+
3) Bump the `version` in the [`build.gradle`](build.gradle) file or remove the
44+
`-SNAPSHOT` suffix as necessary. Commit and push all the changes to the Git
45+
repository.
46+
47+
4) If there is an issue tracking the release, close it.
48+
49+
5) To check that everything is fine, build the code:
50+
51+
```shell
52+
cd /path/to/xml-dtd
53+
./gradlew build
54+
```
55+
56+
6) Clone the `[email protected]:css4j/css4j.github.io.git` repository (which
57+
contains a bare-bones Maven repository) and let `/path/to/css4j.github.io` be
58+
its location.
59+
60+
7) From your copy of the xml-dtd release code, write the new artifacts into
61+
the local copy of the bare-bones Maven repository with:
62+
63+
```shell
64+
cd /path/to/xml-dtd
65+
./gradlew publish -PmavenReleaseRepoUrl="file:///path/to/css4j.github.io/maven"
66+
```
67+
68+
8) Produce the necessary directory indexes in the local copy of the bare-bones
69+
Maven repository using [`generate_directory_index_caddystyle.py`](https://gist.github.com/carlosame/bd5b68c4eb8e0817d9beb1dcfb4de43d):
70+
71+
```shell
72+
cd /path/to/css4j.github.io/maven/io/sf/carte
73+
generate_directory_index_caddystyle.py -r xml-dtd
74+
```
75+
76+
If the changes to the `css4j.github.io` repository look correct, commit them but
77+
do not push yet.
78+
79+
9) Clone the [css4j-dist](https://github.com/css4j/css4j-dist) repository and
80+
execute `./gradlew mergedJavadoc`. Move the javadocs from `build/docs/javadoc`
81+
to `/path/to/css4j.github.io/api/latest`:
82+
83+
```shell
84+
rm -fr /path/to/css4j.github.io/api/latest
85+
mkdir /path/to/css4j.github.io/api/latest
86+
mv /path/to/css4j-dist/build/docs/javadoc/* /path/to/css4j.github.io/api/latest
87+
```
88+
89+
If the changes to the `css4j.github.io` repo look correct, commit them with a
90+
description like "Latest modular Javadocs after xml-dtd 4.2.1" and push.
91+
92+
Check whether the ["Examples" CI](https://github.com/css4j/css4j.github.io/actions/workflows/examples.yml)
93+
triggered by that commit to the `css4j.github.io` repository completed
94+
successfully. A failure could mean that the jar file is not usable with Java 8,
95+
for example.
96+
97+
10) Create a `v<version>` tag in the xml-dtd Git repository. For example:
98+
99+
```shell
100+
cd /path/to/xml-dtd
101+
git tag -s v4.2.1 -m "Release 4.2.1"
102+
git push origin v4.2.1
103+
```
104+
105+
or `git tag -a` instead of `-s` if you do not plan to sign the tag. But it is
106+
generally a good idea to sign a release tag.
107+
108+
Alternatively, you could create the new tag when drafting the Github release
109+
(next step).
110+
111+
11) Draft a new Github release at https://github.com/css4j/xml-dtd/releases
112+
113+
Use the contents of the `RELEASE_NOTES.md` file to summarize the most important
114+
changes in the release description.
115+
116+
Add to the Github release the _jar_ files from this release.
117+
118+
12) Verify that the new [Github packages](https://github.com/orgs/css4j/packages?repo_name=xml-dtd)
119+
were created successfully by the [Gradle Package](https://github.com/css4j/xml-dtd/actions/workflows/gradle-publish.yml)
120+
task.
121+
122+
13) In your local copy of the [css4j-dist](https://github.com/css4j/css4j-dist)
123+
repository, update the xml-dtd version number in the
124+
[maven/install-css4j.sh](https://github.com/css4j/css4j-dist/blob/master/maven/install-css4j.sh)
125+
script. Commit the change, push and look for the completion of that project's
126+
CI.

0 commit comments

Comments
 (0)