ReactiveCircus / app-versioning

A Gradle Plugin for lazily generating Android app's versionCode & versionName from Git tags.
Apache License 2.0
205 stars 3 forks source link

Support custom glob pattern for matching git tags. #11

Closed ychescale9 closed 3 years ago

ychescale9 commented 3 years ago

Resolves #6.

Introduced a new tagFilter config for git-tag matching based on custom glob pattern.

By default app-versioning uses the latest tag in the current branch for versionCode and versionName generation. Sometimes it's useful to be able to use the latest tag that follows a specific patterns (e.g. when multiple APKs are being built from the same codebase, each with its own versioning metadata).

To find the latest tag with appA as the SemVer build metadata:

appVersioning {
  tagFilter.set("[0-9]*.[0-9]*.[0-9]*+appA")
}
ychescale9 commented 3 years ago

@Wrywulf I'm merging this and doing a release. Please let me know if it works for you when you get a chance to try this 😃