Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic version name #333

Merged
merged 1 commit into from
Jul 10, 2022
Merged
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
15 changes: 8 additions & 7 deletions tracker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

def versionMajor = 4
def versionMinor = 1
def versionPatch = 4
def myVersionName = "${versionMajor}.${versionMinor}.${versionPatch}"

android {
compileSdkVersion project.ext.globalCompileSdkVersion

Expand Down Expand Up @@ -89,7 +84,7 @@ afterEvaluate {

groupId = 'org.matomo.sdk'
artifactId = 'tracker'
version = myVersionName
version = getTag()

pom {
name = 'Matomo SDK for Android'
Expand All @@ -106,4 +101,10 @@ afterEvaluate {
}
}
}
}
}

@SuppressWarnings('unused')
static def getTag() {
def process = "git describe --tags".execute()
return process.text.toString().trim()
}