mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-02-07 14:58:24 +00:00
Use git describe instead of hardcoded version number
This commit is contained in:
parent
680a0ff701
commit
4c5c0b58c6
1 changed files with 11 additions and 1 deletions
|
|
@ -154,6 +154,15 @@ task copyAssets(type: Sync) {
|
|||
}
|
||||
project.tasks['preBuild'].dependsOn 'copyAssets'
|
||||
|
||||
def gitversion = new ByteArrayOutputStream()
|
||||
|
||||
task getGitVersion {
|
||||
exec {
|
||||
commandLine 'git', 'describe', '--abbrev=0', '--always'
|
||||
standardOutput = gitversion
|
||||
}
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
|
|
@ -164,9 +173,10 @@ uploadArchives {
|
|||
pom.project {
|
||||
groupId 'org.linphone'
|
||||
artifactId 'liblinphone-sdk'
|
||||
version '3.4.1'
|
||||
version project.hasProperty("debug") ? gitversion + "-DEBUG" : gitversion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.tasks['uploadArchives'].dependsOn 'getGitVersion'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue