Skip to content

Latest commit

 

History

History
126 lines (91 loc) · 4.78 KB

RELEASE_HOWTO.md

File metadata and controls

126 lines (91 loc) · 4.78 KB

How to produce a css4j-dom4j release

Please follow these steps to produce a new release of css4j-dom4j.

Requirements

  • The Git version control system is required to obtain the sources. Any recent version should suffice.

  • Java 11 or later. You can install it from your favourite package manager or by downloading from Adoptium.

  • The generate_directory_index_caddystyle.py script and a recent version of Python (required to run it). The script is necessary to create the index files in the bare-bones Maven repository currently used by css4j-dom4j.

Steps

  1. If your local copy of the css4j-dom4j Git repository exactly matches the current master HEAD, use that copy to execute the gradlew commands shown later, otherwise create a new clone of the [email protected]:css4j/css4j-dom4j.git repository with git clone and use it.

For reference, let your copy of the css4j-dom4j release code be at /path/to/css4j-dom4j.

  1. Execute ./changes.sh <new-version> to create a CHANGES.txt file with the changes from the latest tag. For example if you are releasing 4.1:
./changes.sh 4.1

Edit the resulting CHANGES.txt as convenient and use it as the basis to update the RELEASE_NOTES.md document. Paste the list of changes in under the ## Detail of changes section.

  1. In the master branch of your local copy of the css4j-dom4j Git repository, bump the version in the build.gradle file or remove the -SNAPSHOT suffix as necessary.

Commit the changes (build.gradle + RELEASE_NOTES.md) to the Git repository.

  1. If there is an issue tracking the release, close it (could be done adding a 'closes...' to the message in the previously described commit).

  2. To check that everything is fine, build the code:

cd /path/to/css4j-dom4j
./gradlew build
  1. Clone the [email protected]:css4j/css4j.github.io.git repository (which contains a bare-bones Maven repository) and let /path/to/css4j.github.io be its location.

  2. From your copy of the css4j-dom4j release code, write the new artifacts into the local copy of the bare-bones Maven repository with:

cd /path/to/css4j-dom4j
./gradlew publish -PmavenReleaseRepoUrl="file:///path/to/css4j.github.io/maven"
  1. Produce the necessary directory indexes in the local copy of the bare-bones Maven repository using generate_directory_index_caddystyle.py:
cd /path/to/css4j.github.io/maven/io/sf/carte
generate_directory_index_caddystyle.py -r css4j-dom4j

If the changes to the css4j.github.io repository look correct, commit them but do not push yet.

  1. Clone the css4j-dist repository and execute ./gradlew mergedJavadoc. Move the javadocs from build/docs/javadoc to /path/to/css4j.github.io/api/latest:
rm -fr /path/to/css4j.github.io/api/latest
mkdir /path/to/css4j.github.io/api/latest
mv /path/to/css4j-dist/build/docs/javadoc/* /path/to/css4j.github.io/api/latest

If the changes to the css4j.github.io repo look correct, commit them with a description like "Latest modular Javadocs after css4j-dom4j 4.1" and push.

Check whether the "Examples" CI triggered by that commit to the css4j.github.io repository completed successfully. A failure could mean that the jar file is not usable with Java 8, for example.

  1. Create a v<version> tag in the css4j-dom4j Git repository. For example:
cd /path/to/css4j-dom4j
git tag -s v4.1 -m "Release 4.1"
git push origin v4.1

or git tag -a instead of -s if you do not plan to sign the tag. But it is generally a good idea to sign a release tag.

Alternatively, you could create the new tag when drafting the Github release (next step).

  1. Draft a new Github release at https://github.com/css4j/css4j-dom4j/releases

Summarize the most important changes in the release description, then create a ## Detail of changes section and paste the contents of the CHANGES.txt file under it.

Add to the Github release the jar files from this release.

  1. Verify that the new Github packages were created successfully by the Gradle Package task.

  2. In your local copy of the css4j-dist repository, update the css4j-dom4j version number in the maven/install-css4j.sh script. Commit the change, push and look for the completion of that project's CI.