nanogiants/android-versioning

Error reading current tag

Closed this issue · 1 comments

Hei,

I have a question regarding (1) usage of tags on a single master branch vs (2) using multiple branches where tags doesn't have a meaning at all.

I'm in the context of 2, where i have a repo with 3 branches dev, staging and master. So keeping both branch merging + tag releasing it's a bit complex.

The question so far, can getVersionName() fallback to latest branch commit hash name?

git describe --tags --always

Hi Constantin,

thanks for reaching out. The plugin assumes that you are using tags as release indicator, like GitHub recommends for their releases (e.g. the structure of this repo): https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository

I don't think it's very reasonable and a common requirement to use commit hashes for the app version name. Sorry😞

I will clarify this in the Readme. Maybe it's worth for you to take a look on how to develop simple plugins using Gradles buildSrc. You show be able to copy most of this logic and customize the git commands.