Thank you for investing your time in contributing to our project!
Please create a new issue on GitHub, pick type 'Bug report' and describe the bug in detail. If possible, please provide a minimal (code) example that reproduces the bug.
Bug reports will be triaged and assigned a priority by the maintainers.
Please create a new issue on GitHub, pick type 'Feature request' and describe the feature in detail.
Feature requests will be considered and assigned a priority by the maintainers.
- JDK >=17
- Maven >=3.8
To contribute code, you will need to create a fork of the repository on GitHub.
- Create a fork of the repository on GitHub.
- Clone your fork to your local machine.
- Create a new branch for your changes.
- Make and verify your changes.
- Commit and push your changes to your fork on GitHub.
- When committing you must sign-off your commit. If you are unfamiliar on how to do this, Google is your friend.
To build the source code, run the following command in the root directory of the project:
mvn installThis will build the source code and run all tests.
When you are done making your changes, you can open a pull request on GitHub.
If your pull request fixes an issue, please reference the issue in the pull request description.
Pull requests will be reviewed by the maintainers.
We use semantic versioning.
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backward compatible manner
- PATCH version when you make backward compatible bug/security fixes
We use GitHub Actions to automate the release process. The release process is as follows:
- The release workflow will build the project, run all tests and then create the artifacts.
- The release workflow will sign the artifacts and upload them to the Maven central repository.
- The release workflow will wait until staging checks are complete.
- The release workflow will update the
pom.xmlwith the next development version and push the changes to the branch. - The release workflow will tag the release in the repository.
Whatever the version in the pom.xml is, that is the version that will be released.
For example if the version in the pom.xml is 1.0.0-SNAPSHOT, then the released version will be 1.0.0.
- Click
Run workflowfor the Release workflow. Select themainbranch. - This will build and upload version
x.x.0to the Maven repository and will set the next development version on the branch tox.x.0-SNAPSHOT.
By default, the minor version will be incremented.
If you want to release or start work on a new major version, you can do the following :
- Select the
Actionstab in theshapeshifter-library-javaproject. - Click the
Releaseworkflow in the left hand menu. - Click on the
Run workflowbutton - This will open a small popup window; first select the branch from which you want to create a release; usually this will be the
mainbranch. - In the popup enter the release version, and the next development version
- Click the
Run workflowbutton; this will create the artefacts, update thepom.xmlwith the new development version, and upload it all to Maven central.
Alternatively, you can manually update the pom.xml to a new major version with the following command:
mvn versions:set -DnewVersion=x.0.0-SHAPSHOTLet's assume the last release was 1.0.0 and you want to make a security or bug fix on it.
- Create a new branch from the tag
v1.0.0, name itv1.0-maintenance. - Manually update the version in the
pom.xml's to1.0.1-SNAPSHOTusing this command:mvn versions:set -DnewVersion=1.0.1-SNAPSHOT - Commit the modified
pom.xml's. - Make your security or bug fix changes on your own (forked) branch.
- Create a pull request for your own branch into the
v1.0-maintenancebranch. - After the pull request is merged, click
Run workflowfor the Release workflow. Select thev1.0-maintenancebranch. Set "Development Version" to1.0.2-SNAPSHOT. - This will build and upload version
1.0.1to the Maven repository and will set the next development version on the branch to1.0.2-SNAPSHOT. - Make sure to cherry pick your fixes to the
mainbranch as well.
You can keep the v1.0-maintenance branch open to make more bug/security fixes, or you can delete the branch when no longer needed.
This can be done for any previous release (including patch versions).