Skip to content

Commit 2cbfa7f

Browse files
committed
Add a RELEASE_HOWTO
1 parent a2d87c6 commit 2cbfa7f

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed

RELEASE_HOWTO.md

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

0 commit comments

Comments
 (0)