Note this documentation is for core project maintainers and all steps may not apply to open source contributors. If in doubt, just ask! We're friendly folks. 🌈
New code changes should always be introduced via a Pull Request branch:
-
Pull latest
master
branch then create new branch off frommaster
and make the changes there. -
If added any new tests, make sure they are all passing by running
sbt test
. -
Submit PR for merging that new branch into
master
. GitHub Actions will automatically attempt a build and run tests, which you can see here: https://github.com/openlawteam/openlaw-core/actions. -
If the build and all checks are passing, the PR can be merged to master.
The master
branch represents the current stable set of the code, and should be considered "release-able" at any point in time.
New releases are cut from the master
branch, and managed via GitHub Releases with Semantic Versioning formatted tags.
To make a release of the current status of master
, follow these steps:
-
On GitHub, navigate to the main page of the repository. Under your repository name, click Releases:
Then click the Draft a new release button:
You can also click and/or bookmark this link to navigate there directly.
-
Fill out the version tag, target and release title fields:
Please note that:
- The target must be
master
. - The version number must adhere to Semantic Version specification.
- The version tag must begin with a
v
in order to indicate it is a version. Thus the full tag should be of the formatv1.2.3
for version. - For release title please also put the identical version tag as seen above. (If left blank GitHub auto-generates very poorly.)
SBT is configured to use these version tags as the source of truth, so treat them accordingly. 😄 In the future, we'll have a script to help out with pre-populating these values.
How to pick a version: In most cases, you'll be doing a "patch" increment, which means just incrementing the last digit of the version. If the current version tag is
v0.1.29
, the next patch would bev0.1.30
. If you think the release requires a larger Semantic Version bump (API changes for example), talk to others on#dev
in Slack to confirm. - The target must be
-
When you're ready to publish your release, click Publish release. To work on the release later, click Save draft.
-
Once a GitHub Release is published, our CI system will automatically start the process to publish the package to BinTray. You can monitor the progress for that process and see when it completes.
-
Confirm that the package was successfully published with the latest version number by checking the BinTray listing.
In the very near future, the following steps will be automated and done in CI, but for right now we're doing them manually while we test:
-
Switch to
master
and pull the latest. You should then also rungit fetch
to ensure you have the latest tags. -
Run
sbt version
and verify the version matches what you expect. If the release you just published was taggedv1.2.3
, you should see1.2.3
.It's unlikely, but if you see a version like
1.2.3-4-gbd90214
it means the master branch has now advanced past the tagged release in commits in the time since you published the GitHub Release. You shouldn't publish these pre-release versions to BinTray. Ping @outkaj and/or @mroth and we can help resolve (most likely by manuallygit checkout
the tag corresponding to what we want to release.). -
Access the BinTray credentials in our keystore (if you don't have access, ask someone who does).
-
Run
BINTRAY_USER=foo BINTRAY_PASS=bar sbt releaseBoth
. (NOTE: Please never ever put these credentials in your .bash_profile or similar auto-sourced file! You are giving them away to every single process that ever executes on your workstation.)