From 93306d6d34e79c95cab20bcc3d01963b606b57f0 Mon Sep 17 00:00:00 2001 From: Sebastian Crane Date: Sun, 24 Apr 2022 18:31:26 +0100 Subject: [PATCH 1/2] Document the build system in CONTRIBUTING.md This commit adds documentation in the CONTRIBUTING.md file about how to generate POM, JAR and uberjar files using matchbot's build system. Signed-off-by: Sebastian Crane --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54d6cfb..8c5e281 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,3 +40,22 @@ For example: > `;; SPDX-FileCopyrightText: 2022 Joe Bloggs ` If the copyright to your contributions is held by your employer, put your employer's name in brackets after your own name. + +## Build system + +### Building a POM file + +The POM file lists the dependencies needed to run `matchbot` as well as some additional information that can help people learn more about `matchbot`. +To generate a POM file, run `clojure -T:build pom`; you should find the generated `POM.xml` file in the `target/` directory. + +### Building a JAR file + +A JAR file contains all the source code of `matchbot` in a form that the JVM can load and pass to the Clojure compiler to run. +To generate a JAR file, run `clojure -T:build jar`; again, you should find the JAR file called something like `matchbot-x.x.x.jar` in the `target/` directory. + +### Building an uberjar + +An uberjar is much like a normal JAR file, but comes with all the dependencies of `matchbot` bundled in it. +This means that it can run directly on the JVM without Clojure being installed (it contains a copy of the Clojure compiler itself). +To generate an uberjar, run `clojure -T:build uber`; you should find the uberjar called something like `matchbot-x.x.x-standalone.jar` in the `target/` directory. +Please note that if you distribute an uberjar, you must not only comply with the licence of `matchbot`, but also the licences of all `matchbot`'s dependencies, both transitive and intransitive. -- 2.30.2 From 0a939da401dd31d3f0c44997ed57293fa1ac0248 Mon Sep 17 00:00:00 2001 From: Sebastian Crane Date: Sun, 24 Apr 2022 18:32:39 +0100 Subject: [PATCH 2/2] Document the release process in CONTRIBUTING.md This commit adds documentation in the CONTRIBUTING.md file about how releases of matchbot are made and published on Maven Central, and how the version number changes between releases are determined. Signed-off-by: Sebastian Crane --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c5e281..58a3bb9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,3 +59,18 @@ An uberjar is much like a normal JAR file, but comes with all the dependencies o This means that it can run directly on the JVM without Clojure being installed (it contains a copy of the Clojure compiler itself). To generate an uberjar, run `clojure -T:build uber`; you should find the uberjar called something like `matchbot-x.x.x-standalone.jar` in the `target/` directory. Please note that if you distribute an uberjar, you must not only comply with the licence of `matchbot`, but also the licences of all `matchbot`'s dependencies, both transitive and intransitive. + +## Versioning and release process + +### Semantic Versioning + +`matchbot` uses [version 2.0.0 of the Semantic Versioning](https://semver.org/spec/v2.0.0.html) scheme, but there is still ambiguity in what exactly comprises the 'Public API' (used for determining the right part of the version to increment) for something like `matchbot`. +This 'Public API' is defined for `matchbot` as everything that is accessible by the end user or administrator of a `matchbot` instance. +For example, a change that requires the configuration file to be updated warrants a major version increment because it effects the administrator; however, a change to the structure of the internal namespaces would only require a patch level version increment because it doesn't affect either the administrator or the end user. + +### Release process + +At some point after a new feature has been added to `matchbot` or a bug has been fixed, a release will be made. +Once a suitable version increment for the type of changes has been determined, the `CHANGELOG.md` file at the root of the repository will be updated with release notes documenting the changes made in that version. +Then, a JAR file and a POM file will be produced using the build system (see above for more information), signed using GPG and finally uploaded to [Maven Central](https://central.sonatype.org/). +Currently this process is done by [Sebastian Crane](https://git.libregaming.org/seabass); if you would like to help with making releases, please familiarise yourself with the process (you can try everything locally except upload to Maven Central) and get in contact! 😀 -- 2.30.2