-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Our Git workflow is based on the Trunk/Cactus workflow. We have, obviously, considered other workflows including the infamous A successful Git branching model, however with a highly dynamic team of contributors of various levels of experience, GitFlow was not the easiest thing to introduce.
This is for long-term contributors, being members of the QLACK Development team on GitHub.
If you want to use any QLACK module for development, you simply clone
the master
branch of the respective repo. Since master
is the default branch name in Git (unless you specify otherwise) there is nothing special here other than e.g. git clone https://github.com/eurodyn/Qlack2.git
.
You may fork the repo you want to contribute and issue Pull Requests against the master
branch. A team member will promptly review your PR and either merge it or suggest additional changes.
To create a patch or a hotfix for a previous version:
- Checkout the tag you need to base your hotfix on.
- Create a new branch named after the version number of your hotfix. For example, if the current version is 2.1.2 and you need to create a hotfix on 2.1.0, you should name your branch as 2.1.0.1.
- Perform your changes, build and make sure all tests pass.
- Commit your changes to 2.1.0.1.
- Push 2.1.0.1 branch.
- Git tag 2.1.0.1 and push your tag.
We release regularly and automatically publish all our releases on Maven Central. From the time of building and publishing a release expect at least a couple of hours before it becomes available/searchable in Maven Central.
Publishing to Maven Central is incorporated into our build process via a release
profile, so there is not much you should manually execute. However, to be able to publish you need some extra, one-off setup (contact the team on #qlack channel for assistance):
- During publishing you will automatically create tags and push those tags. So, you should be able to access GitHub via SSH keys, so you need to have your public key uploaded on GitHub, see connecting-to-github-with-ssh.
- All release artifacts are GPG-signed. You need to have the private-key as well as the password to use it.
- Configure your
settings.xml
to contain an entry for the GPG password:
<server>
<id>gpg.passphrase.qlack</id>
<passphrase>FOOBAR</passphrase>
</server>
- Request the access token for the Sonatype server we are using as an intermediary for publishing to Maven Central.
- Configure your
settings.xml
to contain an entry for the Sonatype server we are using as an intermediary for publishing to Maven Central:
<server>
<id>ossrh</id>
<username>FOO</username>
<password>BAR</password>
</server>
- Request PGP keys.
Once the above conditions are met you are ready to publish QLACK to Maven Central:
- Make sure you have all latest sources. If necessary, commit, merge, and push changes.
mvn release:clean release:prepare -Prelease
mvn release:perform -Prelease
To rollback a release, in case something went wrong during your maven build, you may issue:
mvn release:rollback -Prelease
.
In addition to the above you should also:
- Delete the newly created tag for the unsuccessful release on GitHub.
- Delete the newly created tag for the unsuccessful release on your local repo.
- If your local versions did not fully revert, you can manually set the old version back with
mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT
mvn versions:commit