Skip to content

Commit

Permalink
Merge pull request #30 from highmobility/brands-v2
Browse files Browse the repository at this point in the history
Brands v2
  • Loading branch information
tonisives authored Nov 29, 2023
2 parents 1a8a18c + ffcad91 commit 48567bc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 21 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Update version

on:
pull_request:
types:
- closed
branches:
- main
# disabled until we don't support v0 and v1 anymore. Read more: `./gradle/deploy-process.md`
# pull_request:
# types:
# - closed
# branches:
# - main

jobs:
create-new-tag:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This is the changelog for v2 releases. See v0/v1 releases in appropriate branches.

## [2.0.1] - 2023-11-29

### Added

- Porsche, Maserati and Kia brands

## [2.0.0] - 2023-16-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=2.0.0
version=2.0.1
kotlin.code.style=official
27 changes: 14 additions & 13 deletions gradle/deploy-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@

Release is done via a merged pull request to main/v0/v1 and then creating a release in GitHub UI.

## Steps for v2
- update CHANGELOG.md
- next version is with minor +1, or the manually updated version
- merge a pull request to main. This creates a new tag with minor +=1.
- optionally set a new major/minor version in `gradle.properties` before merging. Then the tag is created according to this manual version. Otherwise, patch number is incremented automatically.
- create a release from this tag in GitHub. Use `Generate release notes`
- Action starts that pushes the package to MavenCentral.
- You can check OSSRH whether release was successful or not.

## Steps for v0 and v1
## Steps for v0, v1 and v2

- update CHANGELOG.md
- update the version in `gradle.properties`. Needs to be done manually because the new tag task works for main branch only.
- merge the PR to the `v0`/`v1` branch
- update the version in `gradle.properties`
- merge the PR to the `v0`/`v1`/`main` branch
- Create release tag manually
- Create a release from this tag
- Action starts that pushes the package to MavenCentral.
- You can check OSSRH whether release was successful or not.

❗Release the v0 and v1 first if releasing all versions. This way the v2 is the latest in the Releases changelog.

## Make a test release locally to staging

- comment out line `useInMemoryPgpKeys(signingKey, signingPassword)` in deploy-ossrh.gradle
- Update version in `$projectRoot/gradle.properties` and call `./gradlew -Prelease :hmkit-fleet:publishToSonatype`.
- Don't merge test version names to main
- Don't merge test version names to main


## Automatic version increment

It is possible to increment version on a PR, but the plugin currently works for main branch only. We want to release all versions with the same process, so we do it as described in the above paragraph. Otherwise, version incrementing works like this:

- merge a pull request to main. This creates a new tag with minor +=1.
- optionally set a new major/minor version in `gradle.properties` before merging. Then the tag is created according to this manual version. Otherwise, patch number is incremented automatically.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ enum class Brand {
@SerialName("lexus")
LEXUS,

@SerialName("sandbox")
SANDBOX,
@SerialName("porsche")
PORSCHE,

@SerialName("maserati")
MASERATI,

@SerialName("kia")
KIA,

@SerialName("tesla")
TESLA,

@SerialName("sandbox")
SANDBOX,
}

0 comments on commit 48567bc

Please sign in to comment.