Skip to content

Latest commit

 

History

History
155 lines (114 loc) · 5.6 KB

RELEASE_HOWTO.md

File metadata and controls

155 lines (114 loc) · 5.6 KB

How to produce an EchoSVG release

Please follow these steps to produce a new release of EchoSVG.

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 EchoSVG.

  • An archiver like 7-Zip.


Steps

  1. In the master branch of your local copy of the EchoSVG Git repository, bump the version in the echosvg.java-conventions.gradle file or remove the -SNAPSHOT suffix as necessary. Bump also the latest version in the README. Commit the changes to the Git repository.

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

  3. If your local copy of the EchoSVG 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/echosvg.git repository with git clone and use it.

For reference, let your copy of the EchoSVG release code be at /path/to/echosvg.

  1. To check that everything is fine, build the code. If you are not using a Windows system do not execute the tests, as several would fail. That is:
cd /path/to/echosvg
./gradlew build -x test
  1. For convenience, now copy all the produced jar files into a new jar directory and create a Zip archive of them. For example if you are releasing 1.2.2:
./gradlew copyJars
mv jar echosvg-1.2.2-bin
7z a -mx7 echosvg-1.2.2-binaries.zip echosvg-1.2.2-bin
  1. Use changes.sh <new-version> to create a CHANGES.txt file for the new version, with the changes from the latest tag:
./changes.sh 1.2.2

Edit the resulting CHANGES.txt as convenient, to use it as the basis for the detailed list of changes when you create the new release in Github.

  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 EchoSVG release code, write the new artifacts into the local copy of the bare-bones Maven repository with:

cd /path/to/echosvg
./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
generate_directory_index_caddystyle.py -r carte

If the changes to the css4j.github.io repository look correct, commit them.

Check whether the "Examples" CI triggered by that commit to the css4j.github.io repository completed successfully. A failure could mean that you need to document something, or that the artifacts are not usable with Java 8, for example.

  1. Generate two archives with the modular Javadocs (for example with the 7-Zip archiver):
cd /path/to/echosvg
./gradlew modularJavadoc
cd echosvg-all/build/docs
mv modular echosvg-1.2.2-modular-javadocs
7z a echosvg-1.2.2-modular-javadocs.7z echosvg-1.2.2-modular-javadocs
7z a -mx9 echosvg-1.2.2-modular-javadocs.zip echosvg-1.2.2-modular-javadocs

The compressed archives will be part of the published release. Notice that the .7z archive is much smaller than the .zip.

Currently, the javadocs are online at the https://carte.sourceforge.io/api/echosvg/ website. Provided that you have the required credentials, you could update it via rsync.

  1. Create a v<version> tag in the EchoSVG Git repository. For example:
cd /path/to/echosvg
git tag -s v1.2.2 -m "Release 1.2.2"
git push origin v1.2.2

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/echosvg/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 echosvg-1.2.2-bin.zip archive that you created, the modular javadoc archives (echosvg-1.2.2-modular-javadocs.7z and echosvg-1.2.2-modular-javadocs.zip), and the result of executing:

./gradlew uberjar

to be found at the echosvg-all/build/libs/echosvg-all-1.2.2-alldeps.jar. Then execute:

./gradlew echosvg-svggen-jar-with-deps

and add the archive at echosvg-svggen/build/libs/echosvg-svggen-1.2.2-with-deps.jar. Finally run:

./gradlew echosvg-transcoder-jar-with-deps

to add the archive echosvg-transcoder/build/libs/echosvg-transcoder-1.2.2-with-deps.jar.

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