Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ jobs:
- image: circleci/openjdk:11.0.6-jdk-buster
steps:
- setup_build_environment
- run: ./gradlew :tag -Prelease
- run: echo "Releasing version" && ./gradlew printVersion
- run: ./gradlew publish
- add_ssh_keys:
fingerprints:
- 'f1:dd:0f:dc:42:b3:bf:9f:b8:e3:e8:3f:9b:92:04:fb'
- run: git push origin $(./gradlew -q :printVersion)

workflows:
version: 2
Expand All @@ -72,4 +68,4 @@ workflows:
branches:
ignore: /.*/
tags:
only: /^release-.*/
only: /^[0-9]+\.[0-9]+\.[0-9]+/
Copy link
Member Author

@pavolloffay pavolloffay Oct 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not support CRs. It could be added later.

the ./gradlew printVersion supports anything in the tag.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ hs_err_pid*
build

.idea

# the ./gradlew printVersion generates this file
# ignore this file because the version is consumed from the git tags only
semantic-build-versioning.gradle
25 changes: 9 additions & 16 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# Release

This repository uses fully automated release process. The release build is triggered by pushing a release tag e.g.
`git tag release-1 && git push origin release-1` (`1` is a sequence number to trigger the release).
The release version is supplied from the
[Hypertrace version plugin](https://github.com/hypertrace/hypertrace-gradle-version-settings-plugin)
that uses git history and [semantic versioning settings](./semantic-build-versioning.gradle) to
decide what the next release version should be.

The major version is incremented if commit history contains:
* Prefix `BREAKING CHANGE`
* Feature suffix `!` e.g. `feat!` or `feat(scope)!`
This repository uses automated release process. The release build is triggered by pushing a release tag e.g.
`git tag 0.2.0 && git push origin 0.2.0` to release version `0.2.0`.

The minor version is incremented if commit history contains:
* `feat` or `feat(scope)`

The patch version is incremented in other cases.
The version is supplied from the
[Hypertrace version plugin](https://github.com/hypertrace/hypertrace-gradle-version-settings-plugin)
that uses git history (e.g. the latest tag) to derive the version. For instance if the last
commit has a tag then the version from tag is used. If the last commit does not have a tag then
the last tag version with `-SNAPSHOT` is used.

## Print the next release version:
## Print the current version:

```bash
./gradlew printVersion -Prelease
./gradlew printVersion # -Prelease - prints the next release version, it's not used at the moment.
```

## Release CI job
Expand Down
11 changes: 0 additions & 11 deletions semantic-build-versioning.gradle

This file was deleted.