Pull requests should not be rebased (as this would rewrite Git's history) but merged with the the latest master and merge as a none fast-forward merge into master.
For example, to merge a pull request fix-xy from http://github.com/cboehme/metafacture-core the following Git commands should be used:
# Bring master up-to-date:
git checkout master
git fetch
git rebase
# Fetch pull request:
git fetch http://github.com/cboehme/metafacture-core.git +fix-xy:cboehme-fix-xy
git checkout cboehme-fix-xy
# Merge master:
git merge master
# Run test cases, check commit, add fixup commits ...
# Merge into master
git checkout master
git merge --no-ff cboehme-fix-xy
The commit message of the merge command should follow this format:
Merge pull-request #PULLREQUEST-ID from cboehme/fix-xy
We shall make releases quarterly. Approximate timetable is every Januar, April, July, October. To plan the quarterly releases we use milestones. First the milestones are named after the quarterly period (e. g. "Q2/2026"). When released we rename the milestone corresponding to the released version number.
Releasing involves to first make and test the release candidate before actually making the release. Note that we provide a GitHub release for manual download as well as a release on Maven central to be consumed as a library.
It's good habit to use semantic versioning in release numbers A.B.C, i.e. increase A when it's a major release breaking backward compatibility; increase B when it got new features; increase C indicating bug-fixes.
You need gpg key, which is uploaded to a public key server otherwise you are not able to set a tag and upload the release to Sonatype.
To upload to Sonatype we need to sign the artifacts. Adjust gradle.properties in the root directory that like this:
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=$e.g."~/.gnupg"
signing.gnupg.keyName=$yourKeyName
signing.password=$keysPassphrase
# depending on gradle plugin versions etc. you may need to use:
signing.keyId=$yourKeyName
signing.secretKeyRingFile=$e.g."~/.gnupg/secring.gpg"
To be able to authorize at central.sonatype you first have to "Generate User
Token" at https://central.sonatype.com/usertoken (must be logged in). Copy/add the
snippet you will be provided when creating the token to ~/.m2/settings.xml.
!This is also needed when testing the uploaded deployment bundle (see below).!
According to the nexus
plugin
you have to add the following to the gradle.properties:
sonatypeUsername=$usernameOfToken
sonatypePassword=$passwordOfToken
In metafacture-core:
- Change to intended current master or specific commit
- Build locally
./gradlew publishToMavenLocal
In your project:
- set your project dependency to
master-SNAPSHOT - Run your tests of your project
a) It's going from your local Git repository to central.sonatype.com to Maven Central. Each station requires some manual actions so you can double check that everything is ok. b) A release should also be published to GitHub.
- Make an annotated signed tag for the release:
git tag -s metafacture-core-A.B.C - When prompted, add a sensible tag message. For instance, something like:
Release A.B.C - Make sure to have a clean Git directory (otherwise the build will fail with the error message
Working copy has modifications):git status - Now you can build and upload the release to Sonatype:
./gradlew publishToSonatype -PpublishVersion=A.B.C closeSonatypeStagingRepository
If the tests went well we can publish. We publish the Metafacture libraries as modules to maven central and a Metafactur standalone runner at GitHub releases.
This provides the standalone runner.
- Push the annotated signed tag you have created in the "Upload" section to GitHub:
git push origin metafacture-core-A.B.C - Now the tag is available on GitHub. You can manually choose to draft a new release on GitHub. The signed
*-dist.*files must be uploaded manually. They are produced like this:and can be found in./gradlew metafacture-runner:signArchive -PpublishVersion=A.B.Cmetafacture-runner/build/distributions/(don't mind theSource codefor that is created by GitHub automatically).
- Finally, go to central.sonatype.com, log in, check the namespace (if you maintain more than one repo). Attention, because once published it can't be removed. If sure, click on "Publish". The artifacts are uploaded to Maven Central (which may take some time; have a look at e.g. metafacture-biblio).i